It sounds you may already know this, but for those who don't: malls were originally designed to be small cities. The inventor of the shopping mall, Victor Gruen, envisioned a structure with housing, medical centers, post offices, in addition to shopping. The idea was to mimic what his birthplace of Vienna already had: a mixed-use center not dominated by cars the way American suburbs are.
99% Invisible has a great episode about it: https://99percentinvisible.org/episode/the-gruen-effect/