How to make base of structure extend to the ground?

I'm making a structure datapack and I want the base of the structure to extend down to the ground similar to the Cobblestone base of Woodland Mansions and Pillager outposts.
Continue to help post