Proper army (Canadian Air Cadet) squadron formation
Python 3, 308 314 309 305 269 bytes

Input is the number rows in a squad and a list with a single integer for each squad, indicating the number of persons in the squad. 

Could probably be golfed quite a bit.

Edit: +6 bytes, fixed a bug for squads with the same number of persons as rows 

Edit: -6 bytes thanks to @Mr.Xcoder

Edit: -36 bytes by combining everything to one function



def z(r,l,v=" ",z="X "):q=[z,v]+[(v*6).join(([z.center((w//r+(w%r&gt;0))*2),v]+[r*[z],[z+[z,v*2][I*w%r and r&gt;=w%r+I]+z*(w//r+(w%r&gt;0)-2)for I in range(r)]][w&gt;r]+[v,z.center((w//r+(w%r&gt;0))*2)])[i]for w in l)for i in range(r+4)];return"\n".join(p.center(len(q[2]))for p in q)


Try it online!