Exactly that is the point. Independencies.
Although I don’t fully understand how your widget’s supposed to look like.
I guess you have some sort of box as an inventory, then the slots which receive the item info while being set into the inventory based on how many items you carry (the array)? Meaning all you see whilst opening the inventory is just… the (probably) sizebox of slots in the alignment you created the box as?