Different cube size/color generator

Hello everyone. I want to make a kid’s logic game. But I don’t know how to implement this functional: I have a specific platform where new cubes (black and white) should be automatically generated (with the restart of this level). Cubes should be small and large sizes (this I also do not know where and how to set up).
But I do not know how to make such a generator. Since I need not just a cube generator. The user can touch the white cubes, but not the black ones.
From this the story will develop in the story.
A sample screenshot of what I want to do: ewfewf.jpg - Google Drive

FYI: I need the whole platform to be filled with cubes. But no more and no less. If it is impossible to realize that the cubes were of different sizes, then let them be the same size.

The platform have a collider, it has bounds, so you may get the area where to place cubes. Split the area into imaginary grid. Go through it row by row and add cubes randomly to cells. You may have additional parameters like size/color probability or how many cells to skip before atttempting next cube.