Distributing objects — Grasshopper

So I’m in trying to auto-furnish a classroom plan. I’ve figured out the walls, doors and windows, but struggling with the interior tables.

I want to distribute the tables and chairs, with set distances like this.

Screenshot 2022-04-01 at 11.55.52

The idea is to represent one set of furniture (table + 2 chairs) as a block. They will be distributed with a minimum distance according to the “local boundaries” (distance between tables). I also distribute the whole group of blocks according to “global boundaries” (distance to window and blackboard).

Any ideas on how to make this kind of distribution? Grids? Arrays? I’m really lost right now…