You don't punish, you correct and teach.
Toddlers, by nature, need guidance. However, this is often in conflict with our desire to be polite and not upset our children. Toddlers need us to be friendly but also to take charge, and we need to not be afraid of hurting their feelings while we provide this caring guidance for them. They *need* us to make limits, because a toddler has no bounds. While that can sometimes feel exuberant for them, it can also feel scary and limitless too. Know that: whenever you make limits, you are giving that child--even if they are furious with you at the time-- a sense of security too. When children learn boundaries, they grow to learn what is safe and comfortable, what is acceptable behavior, and they learn that their parents can protect them and keep them safe. The reverse is true as well, as you seem to know...
Some things you can do to establish limits:
Keep language simple, and prepare the child for what you expect. When you are leaving daycare, focus on her exclusively in that last minute before leaving the toddler room. "We are going to the car now. Hold my hand." Because she is not walking with you and instead running away and running around, you are taking charge. She needs to hold your hand all the way to the car until you can see that she can walk out to the car with you comfortably.
With a child two or older, you may offer a choice "We're going right to the car. You may walk with me or hold my hand." The second she begins to dart off, you take her hand. "I see you need to hold my hand now." Keep your voice calm, use very few words, and keep the direction positive. Telling her "don't run" keeps her brain thinking about what she wants to do. Telling her "hold my hand" helps her know what she's meant to do in that moment. She may not like it, but it *is* time to hold hands.
When it comes to this age, I personally prefer to use positive guidance and to physically assist a child who needs help moving along. I do know that toddlers move along more slowly, so please do allow your daughter time for transitions and for her brain to pull out of what was happening before and to focus on what she needs to do. However, this doesn't need to be forever. Some kids have a hard time leaving off play, which is when I use techniques like saying goodbye to toys/places they are interested in. Remind your child "such and such will be here the next time we come. It's time to say goodbye to it." This makes the transition more concrete in the child's mind. (I used this with a lot of my toddler groups and started doing this with our son when he was about 16 months old, or earlier. He's five and still I used it today, quite effectively.) Saying goodbye to places and things gives the child closure, in some way, much like it does for us as adults.
When toddlers say "no", I repeat the direction once more, point to what I am asking the child to do, and then walk them through the task. Sometimes this is a rather un-fun 'hand over hand' ordeal (your adult hands are gently but firmly helping them pick up a toy and put it away), but the job needs to get done. Toddlers aren't necessarily good at expressive language, so if a child is really digging their heels in, I do try to be a bit of a detective and see what the problem is. Are all of their needs met? If I child is hungry or tired or wet, or anxious, these are times that call for tending to that root problem. So, if I have a hungry little one who doesn't want to pick up their toys, we'll take a lunch break and try it again later. This is more about attending to what's most important, and those biological needs don't subdue or disguise themselves. Just to keep that in mind...
For hitting, I put a child in a place by themselves for a minute or two. Sometimes, they really need space to play someplace away from everyone else. Something I do with children of all ages is to have the person who was hit tell the hitter how they felt; with pre-verbal children, I will verbalize it for them. "Suzy doesn't like when you hit her." I also attend to the hurt child first, and ask the child who did the hurting to help me get an ice pack or make amends in some other way. Toddlers, from my experience, benefit more by being separated than by getting time-outs. After so many years of working with this age it is my observation that it is VERY hard for a toddler to make the connection of avoidance of a time-out to a desire to self-regulate. For many children, being separated from the group for a few minutes is instructive and provides the child what they needed: a break from being in the group. Do remember that toddlers are only learning to be social animals and that everything is "mine" in their eyes. So, when hitting and hurting happens, have her separate and take a break. However, you also need to provide alternate things to do when she comes back. If she wants to hit, offer her appropriate substitutes, like a hand drum (even an old butter tub with the lid on will suffice). If she likes to throw, get a few soft fabric balls and redirect her to those; take away the offending objects that she throws. (Sometimes kids go through phases when you do need to clear out all the hard toys and board books. It just happens. You get to be the proactive adult when those times come.) Do not give them back with a warning, just "You can throw the soft balls" and offer what's doable.
Parenting toddlers is breathtaking, challenging, exciting and very, very hard work! Hang in there. After 20 years of working with little ones, my impression of toddlers is that they are all curiosity, all will and spirit, and those good things often collide with what we adults need them to do as well as the boundaries of other kids. Consistent loving guidance will temper that exuberance and willfulness a bit. And remember, this too shall pass... Three's are a whole other story!:)