If you want to bring people physically closer together, just lean into NIMBYism and keep housing supply small. As current trends continue and require more people to live in city centers, we'll see more and more instances of people forced to have roommates when they'd rather not, multiple families forced to share a single apartment when they'd rather have their own, etc.
But somehow I think you will actually create conflict, tension, and claustrophobia, not happiness.