Create an NSMutableArray and add each sprite to it. Later on use fast enum to go through all of the elements in the array and update the position:
In your class' interface:
NSMutableArray *mySprites;
In your CCLayer's init:
mySprites = [[NSMutableArray alloc] init];
for(int i = 0; i < 30; i++)
{
CCSprite *sprite = [CCSprite spriteWithFile:@"CoolSprite.png"];
[self addChild:sprite];
float farawayX = // ... ;
float someY = // ... ;
[sprite setPosition:ccp(farawayX, someY)]
[mySprites addObject:sprite];
}
In your update routine:
for(CCSprite *sprite in mySprites)
{
CGPoint newPos = // ... ;
[sprite setPosition:newPos];
}
I don't believe that CCSprites have a userData like Box2D b2Body objects do. You might need to create your own class that either is composed of a CCSprite or is a child of CCSprite and give them some member variables that describe their velocity, etc. This way you can make each sprite move at a different rate across the screen.
Take note that if you later decide to remove a particular CCSprite from the world make sure to remove it from the NSMutableArray with [mySprites removeObjectIdenticalTo:sprite]; or else you'll get bad access errors and crash!