How to make an object from basic volumes? I'm new to 3d model and I want to create an object from basic volumes like spheres, cylinders, cubes, etc. For instance, I want to make a cube by fitting speheres in. Is there an automatic way of doing this in Blender or any other program?

Edit details: Your answers were so helpful. In addition, what I'm really trying to do is fill an irregular form with other irregular forms. For example, let's say, a
house (a cube with a pyramid on top of it) filled with little bottles (like little cylinders). (It's for a 3D printing project). Is this possible to do?
It's not really automatic but this can be done with the array modifier. Take your object that you want to make a cube out of and then apply three array modifiers. The result:


Going from here we can fill more complex things with the Boolean modifier. Take the mesh you want to fill with stuff and enclose it in the arrayed object. It will look something like this:


Then we use the Boolean modifier to cut out the shape. Giving this:


From here we apply the stack. It't not perfect / ideal / fast, but hopefully this is enough to get you somewhere until someone else has a better idea.

Final: