sharing at age 4
"sharing" is not something 4yo do very well. Usually it is more like 'playing side by side'. At this age they are just starting to make the transition to real 'sharing'. I would encourage your daughter to be as nice and friendly as possible. I would also ask her teacher what kinds of activities she plans that would foster sharing and if she demonstrates what sharing really is. As far as playing only with certain ones. This is pretty common too. Some years I see it worse than others, especially if I have a more dominating girl who has lots of 'ideas' and sort of bosses the others around with her ideas of what to play. Again, I would talk to her teacher and find out the dynamics of that class this year. With a little encouragement from the teacher usually groups can be dispersed and the children can learn to play with others.
In my class I try not to interfere too much unless I see bullying or obvious exclusion. I try to find another child of similar tempermant and get those to together. You might find out who your child is most like, (not that same as who she LIKES, everyone likes the popular kids) and arrange a 'play date' for a few times to see if your Daughter and the other child can form a friendship that will carry over to the school.
hope that helps.