Before they died I got some of those boxes Duncan was suggesting from Joanne's Fabrics, and shoved some sheet metal in the bottom to stick magnetized minis to. Work pretty well, I have a wireframe rack in my Workshop and they stack in there very nicely. $9 I think for the small ones, a bit more for the bigger ones.
The exact name was: Super Stacker 14" x 10" Clear Plastic Document Storage Box. I believe the brand name was spun off as "Advantus":
https://www.walmart.com/ip/Advantus-Super-Stacker-Document-Box-Clear-36873/426970018
They have a different one that's the same size (or damned close) but about 2.5-3x as tall, which work for larger minis (dreads et all).
The piece of metal I put in there was a "8 in. x 12 in. Galvanized Steel Flashing Shingle." Got it at the local hardware store for about $2. It's a bit too big by about 2-2.5", but what I just did was hammer it to a 90 degree angle on that side and glued it into place with some craft glue.
If not for magnets and metal, packing foam would probably be pretty cheap to purchase too. Since it's square it'd just be a matter of cutting holes for the minis.
As for 3d printed ones, that might be outside the use case for a 3d printer, although I'm interested in this "12 slot box" you tried out? If I had one of those fancy laser cutters and could make something out of MDF that would definitely be on my short list of things to try.