How do I make a structure match the terrain?

I am trying to figure out structure generation, and I am confused about how village paths match the terrain, but village houses stay static (like the floor doesn't reshape to match the terrain). I checked misode to see if it was clear in there, but I saw nothing to differentiate them in the structure file. Is it something stored in the .nbt of the structure?
Continue to help post