M.P.
When you describe his tantrums at home at night, my first thought was that he was overly tired. The best way to prevent tantrums is to be sure they're not hungry, get enough sleep/rest and limit stimulation. It sounded like you were saying he had a tantrum at the store and then had a really rough evening. If this had been my grandson I would have made sure that the evening was very calm. I'd encouraged him to rest by reading to him or even by having him watch a short movie. I might feed him early and put him to bed early.
It just sounds to me that he's overly tired or overly stimulated. He may be one of those toddlers that needs less activity because he's overly sensitive to being around people, being involved in activities, being around noise, etc.
Yes, teach him to hit the pillow instead of the wall. You could try giving him a boppy doll. This is a toy made of vinyl that is about the same size as a toddler. It's base is weighted with sand. The child hits it and it falls over but bounces right back. He can hit it over and over. It's probably best that the doll not look like a child or real person. You don't want him to think it's OK to hit people.
When both of my grandchildren had temper tantrums I found it worked best to sit on the floor in the same room and without saying anything wait for them to stop. They, then, usually crawled over to me and sat in my lap for awhile. Toddlers and children need that quiet time to recover and most respond to being comforted.
Can you tell when he's getting frustrated? IF so, I suggest you find a way to get him into a quiet place. A tantrum means he's overwhelmed. When you can intervene before he reaches that feeling you can frequently abort the tantrum. Some days it's best to not go to the store, for example.
And put him in his room after the first tantrum. He's telling you he needs quiet time. I suggest making a place with soft pillows, some stuffed animals, books if he likes looking at them for him to retreat to early on. Perhaps put on some quiet music. Don't hesitate to provide a break for him by putting him in his room or some other place that is comfortable, cuddly, soothing.
Tantrums are a stage and often do not last for very long. Because you're working on understanding and dealing with them, I suggest that you'll find a way to manage his time so that he has less need to tantrum. The book How to Talk etc. is excellent and will be useful. How you word things does make a difference in how a child responds. Perhaps he needs more of an explanation instead of a simple statement or vice versa. Wording expectations in a positive way and thus encouraging his co-operation may help. My daughter found that when she asked her children to help her by doing such and such that they were more willing to do something like putting on their coats, for example. "Please help Mama and put on your coat now."
When one is angry, irritated, etc. their body has extra energy. This is one reason toddlers/children tantrum. To get rid of the energy. Sometime it helps to provide some form of energy burning activity such as running back and forth in the room, jumping up and down. When my grandchildren were toddlers, I could sometimes avert a tantrum by play fighting with them. I'd close my fists and swing in their direction in short bursts without touching them. I'd stay far enough away from them that they would be less apt to hit me. I taught them that we're just burning up our energy; that we don't hit; we just pump our arms. Usually we'd all end up laughing. IF they were upset because they wanted to do something that I said no to, I'd model for them, "I'm so mad! Grandma won't let me .........!"
It's important that we let them know that we understand why they're upset and we can do that by strongly verbalizing what we think they're feeling. I learned this from the How to Talk, etc. book.
This too will pass. You're on the right track to learning how to manage it.