A huge chunk of the Viennese flats are publicly owned.[1] I think it's very hard to replicate for other cities. It's the result of decades of social democratic governance.
Two things they do really well: Keeping rent prices low by "dumping" and preventing ghettoisation by creating affordable housing in every district, not just some crappy areas.
[1] http://milwaukeeclt.org/2017/07/10/how-vienna-ensures-afford...