Okay, let's look at the flying/floating castle theme. You could do that with Wall of Force or Force Cage spells made permanent, and used as the anchor or foundation points.
Wall of Force could provide a longer, and hence more stable, base line, but then it's kind of hard to build solidly on a vertical wall of indeterminate thickness.
Place it over a lake, so you have an automatic moat all around and underneath. Also helps dispose of the waste material that gets dropped.
In any case, a proper castle needs to balance two competing factors.
1) It needs to be defensible, which actually means keeping the length of wall that needs to be manned to a minimum.
2) It needs to be able to shelter citizens from the surrounding town and farms during time of war, which means that you need to maximize "surplus" living space and supply storage.
You need a ready way to supply the place, not only to support yourself in pallacial style, but to feed the staff and troops and their families. That makes the flying/mountaintop/island fortress problematic.
Defensively, the hilltop fortress is the best compromise. Keep the approaching faces steep, and lay the main access road as a series of switchbacks that scale a steep face. Easily manageable by wagon or cart, but extremely exposed to defensive fire. The local populace seeking shelter can gain access, but it's a nightmare for an invading or besieging force.
In D&D terms, the outer walls have to be craftsman finished, not just Wall of Stone. So do the exposed cliff faces, for that matter. Transmute Rock to Mud won't affect worked stone, but rough natural stone has no defense against it. And Wall of Stone is described/defined as "rough stone".
Depending on my budget, I'd try to cast Forbiddance along, just *outside* the castle walls, everywhere except at the various gates. That will flat out kill any enemy soldiers of the wrong alignment as soon as they try to attack the walls. (Most soldiers can't take the damage that spell dishes out.)
I'd reenforce outer walls at key places with Wall of Force made permanent, not necessarily on the walls themselves, but above them, leaving enough room for my archers to fire underneath them, but acting as a shield against any other incoming missile fire. Anything aimed over the wall and into the castle grounds would be blocked.
As far as actual rooms are concerned: Lots of residential apartments, both in the main building and in surrounding areas. Like I said, we need to be able to shelter the town and local farm population. Probably several communal kitchens in the various apartment sections.
Emergency supplies would be housed in the main building, for security reasons.
A few large chambers in the main building that could be used for formal dining, dances, etc. One of these could serve as a large audience hall, but I'd need a smaller one as well.
Tower apartments would be reserved for spellcasters and Alchemists, and would be particularly reenforced to contain the occasional explosion and/or tear in the fabric of reality. Yes, these are occupational hazards, but there's no reason not to maintain a safety zone for the rest of us.
Library and scriptorium, where books can be collected and copied.
A working smithy, perhaps two depending on the size of the place, both for the shoeing of horses and for armor and weapons.
An aerie, where winged mounts are kept, maintained and raised. Giant Owls for night patrols and Giant Eagles for daytime. Probably two separate hatcheries at different ends of the grounds.
You need ordinary riding stables as well, of course.
There would have to be a chapel, of course, as well as small shrines to a number of deities scattered about. (I've long believed that essentially every bar is a working shrine to Olymidara (sp?). He's the god of gamblers, wine, tricksters and mischief makers, so any bar or tavern where a dice game springs up is sure to have men praying for luck.
)
Oh, I almost forgot: I'd need some chambers for myself as well. Can't forget that...