Maybe you can divide the game space by creating a virtual grid.
Let's say that the space the balls can bounce is 400X400 pixels and let's assume we want a 4x4 grid. That means a cell size of 100X100 pixels.
Create an invisible sprite with those dimensions and place it in the top-left cell in the beginning of the game.
When its time to spawn a new ball check if the dummy sprite is overlapping any object.
If yes, move it to the next cell and re-check. If not, spawn your ball in the empty cell.
I don't know how efficient that might be (or if it is working at all ) and sorry if it sounds like a stupid solution, but I'm a beginner myself