Higher interest rates, rising prices push single-family homes out of reach for some homebuyers, but townhomes remain an affordable choice.