Duplicate objects randomly in a delimited zone
See this question for details on how to setup a particle system for distributing objects inside a shape. 

Once you've done that, you can convert a particle system to real objects with &#9096; Ctrl&#8679; ShiftA or the convert button in the modifiers panel:



Note that this won't remove the particle system, so remember to delete it if you are done with it.