Tiny black boxes? Are these all clearly separate boxes, or a big block of boxes stacked tightly together?
If it’s all separate, then you can probably make them from bits of plastic card and/or strip, laminated together if necessary to get the right thickness, then cut and/or filed to the right size.
For one big block, build the basic shape out of plastic card and add details from more bits of card, strip, and what have you, and perhaps by scribing it.
If you’ve got a photo of it, I can probably be more specific about how I would go about making it myself, which may or may not be helpful to your efforts