This is an interesting, but rather broad question. Do you mean how are they built? Or why are they built? There are records of psychiatric hospitals going back at least 1,000 years. Back then institutions found in the Near East region were the ideal. European travelers wondered at the humane treatment of the insane.
Speaking generally, the Middle Ages sucked if you were insane. In fact, you have to get to the Victorian era before you see any real progress again. Reformers were of the opinion that being nice to lunatics was a better policy than dousing them with ice cold water, beating them and starving them. Go figure. An interesting tale from the inside of one of the “reformed” institution can be found here:
BROADMOOR REVEALED: Victorian Crime and the Lunatic Asylum: Mark Stevens: 9781781593202: Amazon.com: Books
The modern psych ward varies wildly from hospital to hospital, depending upon budget. I’ve been in five of them. Some I wish I never left, others I would have cheerfully murdered to get out of. After reading that book about Victorian Broadmoor, I can truthfully say that three of the five were inferior in nearly all ways to Broadmoor of 150 years ago, and that’s taking into account that it had no central heating. I’m not certain about hot water.
In general, you need to create your psych ward by making it a secure location with only 1 way in or out. You can include access to the outside, so long as no one can hop the wall and escape. You’re designing a prison, after all. Keep it away from the population of a town, and if it’s part of a hospital keep it separate from the main building if possible. If it must be part of the main building, make it part of a wing that can be easily isolated.
The first room of your ward should be something of a “common area”. There should be three significant aspects to this area. It should feature a secure location for your staff. This generally takes up a wall somewhere near the entrance. The second aspect should be the doors themselves. They should be heavy, two sets of large, electric double-doors that swing open toward the inside. This allows a gurney or wheelchair to be rolled in from the outside with paramedics or hospital staff accompanying it.
You’ve got a double set of doors why? Security. They never open at the same time. The first set opens, closes, then the second set unlocks, allowing entrance (or egress, depending). Both are controlled by the staff from their secure location. They need to sit behind shatterproof glass with a clear view of the common room and the doors. There might be a sliding window with a locking mechanism so an on duty nurse can speak to a patient, or maybe a small trough under the window that something can slide under, like medication. It depends on budget and paranoia.
The third aspect of the front room is the “common room” itself. While the doors and secure nurse’s station are pretty universal, the common room varies significantly. The higher the budget, the bigger the room, the brighter the paint, the newer the furniture. In one hospital the entire place was gray. It had eight or nine cafeteria tables put in a square with seats on the outside. There was a water fountain. And that’s IT. In another, the carpet was burnt orange, the entire floor plan was open, there was a door to an exterior smoker’s lounge. Sofas and easy chairs were scattered about, and there was a circle of chairs for “group encounter”. There was also a television and stocked bookshelves.
The common room is the central focus of the patient. Group sessions usually take place there. It’s also where they eat and pass the time between sessions. Patients are discouraged from spending time alone in their rooms. You never know what kind of mischief they can get up to in there, and there’s not enough staff to watch them all. Some wards will lock patient rooms when they’re not sleeping.
Branching off from the common room are the patient’s rooms. Again, these vary depending upon budget. In the high-end hospitals you have your own room. This consists of a single bed, mechanical. Possibly a window with a view that’s slightly distorted due to the thickness of the shatterproof glass. There might be a table and chair. Some might have a bathroom in the room. If so the mirror is metal, not glass. It’s bolted into the wall. There are no towels, sometimes no toilet paper. Anything like that must be requested from the nurse’s station. Everything except the toilet paper must be returned after use, including the soap.
Most wards have several hallways in a spoke pattern from the common room, leading to 6 rooms (or so), 2 patients each, with a common bathroom situated in a central location between the rooms, about halfway down each hall. When there are two patients in a room there may be a curtain hanging between the beds that offers the illusion of privacy during an exam. If there are two people, generally there’s no desk / chair.
Again, depending on size there may be other rooms for specialized therapy. In my favorite hospital they had one central room for group sessions. Another room was dedicated to music therapy, and still another for art therapy. There were small rooms for one-on-one sessions.
Does that answer your question?