Hi,
A possible solution of handling these different sized Segments easily would be by using two Generators (for example the Linear 1S for borders and Array 2S in the Extend X/Y Size to Area mode to fill it). Attaching a sample scene. Hope you'll find it helpful.
Best regards,