Parameterize the design of courtyard

Hi all,

I am trying to create the following courtyard structure using grasshopper and the width and length of those blocks can be changed (parameterize) independently. I have tried to build it one by one using the “rectangle” component but I realize it is not a smart way. I believed there should be a smarter way to do it. Would anyone have suggestions on this?

First level: courtyard
Second level: 3 to 4 “L-shape” box connected by corridors

What I am trying to do:

Appreciate if there is any suggestions:) (8.4 KB)

0412 Update:
Please feel free to try the file and I believe that there will be a smarter way to do that. (58.1 KB)