How DO vehicles do that, code wise, I wonder tho....
Looking at the code for the Juggernaut (GROUNDVEHICLES_A5_JUGGERNAUT_HEAVY_ASSAULT_VEHICLE.XML) it seems like the garrison code uses the following:
CanContainGarrison in the <Property_Flags> tag;
GARRISON_VEHICLE in the <LandBehavior> tag;
and then a group of tags that look like this: