So this is the ‘shared’ portion of the shared nested component. Assuming you build the family with a shared instance parameter for each data point you need to track (something you are doing for the manually paced instances), by making the family shared you can click on it and set the parameter values accordingly. You can even make the width of box 1 control the placement of box 2-20 and stop placing them when you exceed the shelf length.
All of that said we are chasing our tails on that topic. You have a workflow in mind, so I recommend trying to build the graph above as a first step, and post an rvt and dyn if you get stuck.