Are there any halachic parameters regarding a building which has an aron kodesh in it and what may or may not be built on top, meaning on the floors above? For example it would seem to me that it would be inappropriate to build a bathroom or bedroom directly above a room which contains an aron kodesh.
See Shulchan Aruch - Orach Chaim 151:12
The prohibition is not only above the Aaron HaKodesh - it's above a shul in general.
Not recommended uses include sleeping - and obviously bathrooms and toilets. Not living there is recommended.
However, there may be loopholes if the shul was built/created after the homes were built.