If malls continue to shut down and decay over the next twenty years, someone should turn them into retirement communities for GenX and Millennials.
Imagine apartments built into what used to be department stores, (Oh, you're JC Penny 203? I'm at Sears 106). Get those old arcades up and running. Set up meal stations at the food court. Once people actually live there, stores will start to move back in.
If I'm unable to finish my life in my own home, that doesn't sound like a terrible option.
The idea of apartments centered around a grocery plaza has been a thing for a while. It's almost an answer, except it still requires transportation to everything else. Plus the stores tend to be higher prices to support the cost of property and because they can.
A town is a bit more than that, but it is how towns typically began, from a central trading place and nearby settlements. Only this is a planned concrete parking lot and established chain along with fully built domiciles, already in a city/town's jurisdiction.
That's where it all falls down. Mandatory parking space kills cities. The point of a centralized commercial area with residential around is that people will walk to it.