My younger daughter was very unpredictable at that age, and would alternate her shocking behaviors to keep us on our toes. She would throw things every now and then (along with hitting, kicking, screaming, and various other obnoxious "terrible two" behaviors). If she threw a toy, we'd immediately take it away, and she'd have to go sit in her room alone to cool off for a minute or two (or longer if she so chose). We don't keep toys in the kids' rooms, so sitting in her room was booooring. The consequence has to be immediate in order to be effective, and Mom can't react emotionally or it becomes a fun game for the toddler.
I don't see much point in punishing kids of this age. They truly aren't sorry, and have zero impulse control, so punishment is not meaningful, and lectures get you nowhere. My logic is that I am simply intervening in the unwanted behavior immediately, and allowing the child the chance to get themselves in control before the behavior has a chance to escalate.
I hope this helps!