To further clear things up, buildings and the tiles referred to in overmap_specials are overmap terrains. Overmap terrains tell the game what to create, field, house, garage, mansion entrance, etc. Mapgen defines how to create a given overmap terrain, and mapgen can be defined one of three ways, builtin (defined in the source), json, and lua (though I don’t think there are any lua mapgens yet).
Right now, our json mapgen definitions aren’t capable of supporting everything that ones written in the source or through lua can, mostly things involving random generation (like the placement of mansion and lab rooms) or computers, so right now some things will have to remain built in.
Side note: you can add your own basements without conflicting with the ones that already exist, just add a new json mapgen for the overmap terrain and set a weight rating for it, and it will generate with whatever relative frequency alongside the other basements.