I don’t know a lot about this, but as far as needing new exterior sides, most likely the zoning and permits would only be given for similar construction if someone was rebuilding because say there was a fire, or some disaster that happened in one unit. If they were tearing down a unit and received permission to do something different, likely they would be required to improve the remaining walls on the still standing structure that butted it. If someone bought all the homes on a block, they could possible rezone the land and do a total tear down or renovate the structures to be very different.
Townhouses can, and usually are, built all at once in modern construction. It’s one large construction and the walls separating the homes usually need treatment to inhibit fires from spreading from one home to the next, and there might be sound proofing too. The facades might be very different from one to the next, giving the appearance of individual looking homes, or they can look very similar with just slight variations like paint color or door color, or no differences at all.
Row houses are homes built very close together, sometimes inches apart. The term row house does vary a little around the country from what I understand. Some parts of the US a row house can be homes sharing a wall, which I think might be what you are interested in with this Q.
Construction can be built with no room or very little room on the sides. Cranes are used to bring materials from above if need be; lowering materials onto the foundation. The most extreme would be city high rises. You can search on YouTube “time lapsed construction of buildings.” Here’s one, but I find it too fast and almost dizzying. You might search for some more and find something that better demonstrates specifically what you are looking for. https://m.youtube.com/watch?v=_TH0bEJvY4A
I know I didn’t thoroughly answer your question, but I hope it was still pertinent enough to be helpful.