How can I create procedural content inside a mesh?

The question is pretty straight forward, the tutorials show procedural content generated in a spherical shape, I mean all the content is generated like inside a sphere, and there are other tutorials on how to do it in an spline, so my question is how can I generate content inside a box, disc shape? like creating an asteroid belt or something where every rock has to have its own rotation, position and size.

Thanks in advance.