offhand, a foreach for the sprites, and the position being set to some x of floor(random(3)) * 200, and y of same, offset from your origin x,y position for the grid. Tweak as necessary.
EDIT: Umm, yeah, don't do this. Follow Magistross' reply below, which is what I intended but somehow completely spaced. Blaming Canada.