Organising HUD buttons?


I’m trying to get some buttons on my HUD to display in a 3 by 9 grid. I’ve already got them set out manually in the correct places but I was wondering if there was a way of organising an array of buttons in to rows and columns with out having to type in the location of each button manually?
My interface is going to have many of these menus and it would be easier if I could create something like a “master” layout and have an array of buttons being put in the correct places.

Is there a way of achieving this?