Is an approach like this one equivalent to what you describe?

 - Using a Rigid Body simulation with collision, pour a bunch of balls into a box:

[![enter image description here][1]][1]

 Choosing a stable frame at the end of the simulation..

 - <kbd>Ctrl</kbd><kbd>A</kbd> Apply visual transforms to the balls, and in the Tool Region > Physics, remove them from the simulation.

[![enter image description here][2]][2]

 - With the pivot set to 'Individual Origins', scale the balls up to your
   interference margin, and reintroduce the inside surface of the box,
   flipped, sealed, and scaled.

[![enter image description here][3]][3]


 Using the Bool Tools shipped add-on..

 - Make a union of the balls..
 - and subtract them from the box

[![enter image description here][4]][4]

..plus clean-ups, etc.


  [1]: https://i.sstatic.net/IK8jb.jpg
  [2]: https://i.sstatic.net/QyMve.jpg
  [3]: https://i.sstatic.net/5eGJS.jpg
  [4]: https://i.sstatic.net/ocqUC.jpg