Prevent objects from spawning on each other

I’m building a platformer where enemies and items spawn at different rates. Is there a strategy for preventing objects from spawning on each other or if they do then moving them off each other? Any tips would be appreciated. 

So the answer to this was to store the objects in a table, then when you spawn an object check its distance with all of the other objects and if it falls too close then move it far enough way. 

So the answer to this was to store the objects in a table, then when you spawn an object check its distance with all of the other objects and if it falls too close then move it far enough way.