"Violence" towards a stuffed animal isn't necessarily a problem. Especially for this age. It is part of imaginative play, just like everything else.
And, expressing violence towards a stuffed animal or pillow, is actually an appropriate means to vent frustration.
Hitting a person/animal is different. At 2 1/2, it is not cruelty or violence, they are still learning. When he hits, make a sad face just say "Ouch. That hurts me. Gentle touches." You can guide his hand in petting the animal or whatever nicely. Then just redirect.
Edited to make an addition:
So, if he is hitting people out of anger/frustration, you need to teach him how to communicate this emotion without hitting. I recommend "Bugs & Wishes":
Get a picture or toy of a bug (ladybug, etc) and a picture or toy of a wand. Role play (and practice, practice, practice) using the bug and wand holding each up in turn:
"It bugs me when you __ and I wish you would _ instead"
This is basically an i-statement for little kids. It works wonders! After some time practicing this in your home. Let him use the props to remind him of the words. After he's comfortable with this part of it, introduce the next stage.
When somebody uses bugs and wishes, the options for response are:
"I didn't know"
"I'll do that instead"
That's it. He/you/whoever gets to choose one of these in return.
This teaches him how to express feelings of frustration/anger appropriately and gives him the words to actually do so (without just saying "use your words"). When he is frustrated at someone, prompt him and ask "Would you like to use bugs and wishes?" This is a tool he will be able to use for life!