Electrical Raceways are spaced horizontally every 24″ o.c. and vertically every 22″ o.c. as marked by a reference line on the face of the panels.
Cut out for the boxes.
Run wires through the raceways.
Use PL Premium 3x to glue the boxes in place.
Use spray foam to cover the wiring and fill the opening, this satisfies the code requirement for wire attachment out of the box.