Help attaching geometry to previous parametric geometry item on list

I’m somewhat new to grasshopper and I’m trying to learn more about data lists, trees and accessing / isolating elements.

Here is my goal:

Imported areas would get converted into individual geometry, spaced apart from each other. The spacing would have to be able to be controllable and adjust parametrically so the areas could change and wouldn’t bump into each other. I tried to isolate the furthest point in the x axis of each box and have the next box in the list start at the edge of the box before it in the list.

Being able to isolate each geometry in the list so additional data could be inserted into each room would be ideal.

If there is a better way to do this I am all ears! Any help would be greatly appreciated.

Arrayed room (13.5 KB)

Array rectangles something like this?

Arrayed room (12.1 KB)

Yes, thank you so much!