People forget that one of the reasons why the malls became so popular and helped collapse the old downtowns was, you guessed it, lack of free parking.
With malls, you could come into a boundary and spend a significant amount of time in a walkable arena with lots of different stores. You knew there would always be parking except possibly at Christmas.
Downtown? Not so much. And you probably had to pay for parking. And carry quarters for the meter. And risk getting parking tickets. etc.
Malls were what all the anti-car people supposedly promise will happen when you remove cars. And yet, I know of no malls that ever gained residence areas within walking distance. Which seemingly, would have prevented the malls from collapsing.
The anti-car brigade has yet to demonstrate why that should be different today.
Also, for what it's worth, you're citing "carry quarters" as some kind of dystopic microaggression to an elder millennial who was absolutely fucking thrilled to share a roll of quarters with his dad when we went to the local game store and crushed Sengoku on the nearest Neo Geo cabinet.
Uh, yeah, it actually WAS. Quarters were a non-trivial amount of currency (a little under a gallon of gas) back when downtowns still existed and parking meters took them.
There is a reason why "meter maids" were hated so much.
Yes, I witnessed this first-hand in the neighborhood where I went to school.
Very vibrant walkable downtown full of shops and restaurants but also tons of street parking. Then one year government wanted more money so they put up parking meters and pushed up the rates to a point most people couldn't afford it (it was a low income area).
Now ~20 years later? The whole downtown is boarded up abandoned shops, just a couple liquor stores remain open. Very sad. All the shops that could move, moved to the malls.
One of the malls near me, about 5 years ago they tore up a good chunk (like a third) of its massive parking lot and turned it into an apartment complex. It now butts up almost directly against the mall.
So at least there's one.
How is that even possible?
Here in the Greater Toronto Area, practically every large mall has at least a few high rises. Some malls are even constructing residential units directly on top of the mall. Even a larger strip mall will generally have some medium sized apartment buildings nearby.
Downtown Mississauga has dozens of high rises up now right next to its biggest mall. Those buildings have completely changed the city's skyline.
I don't think nearby residence areas would have prevented malls from collapsing.
Online shopping made them largely obsolete as a place to actually shop, with many going bankrupt and others hanging on by a thread. Then a global pandemic cut some of the remaining threads.
Eh, after some lost packages, dealing with USPS for claims, wanting to touch the product before purchasing, and easier returns, I find myself returning to brick and mortar lately.