I did that once, a long time ago. What I did was create a grid to place the items on, mathematically.
First you get the square root of the number of items you have, and Math.ceil() that. That number you have now is the number of rows as well as number of columns.
This means you have created yourself a grid with those rows and columns, which you can use to place your item in a certain cell somewhere in that grid.
Using Math.random() you can randomly chose a cell to add a little randomness.
The only problem is when the items are not equal size, then my solution wont really work that well.. But it might help you out a bit