The gelatinous cubes that you bump into down on the second level dungeon aren't really the unit that is worth talking about.
The gelatinous cube, as you know is, is just a rogue subunit of a bioweapon. But even that simple description oversells it. The HD 4, slow-moving, mindless gelatinous cube is just a fragment.
Gelatinous cubes were designed to operate in concert--many thousands of cubes sliding over each other simultaneously, self-assembling into much more useful shapes.
Saying that a gelatinous cube is a stupid monster is a bit like saying that the tarrasque's bellybutton is a stupid monster. You aren't wrong locally, but you've got some bad assumptions back on the global level.
A Lesson In Self-Assembling Subunits
I'm just going to throw some Youtube videos at ya'll. It's almost midnight and I have work tomorrow.
You don't have to watch them all--I'll write the takeaway below each video.
Fact: a bunch of very stupid sub-units can display a startling degree of emergent complexity through very simple algorithms. Many stupids equal a smart (as long as another smart wrote the program). Look at how ants design their nests.
Fact: most people are vastly underestimating the behaviors that an externally-rigid cube is capable of. This robot uses three internal flywheels to generate torque, but a gelatinous cube could just swirl its guts around and then stop suddenly, which would cause the whole cube to flip. More complex biomechanics are built from this.
Fact: cubes have some notable advantages when it comes to self-assembling swarms. They're very easy to stack, and they're very easy to move past each other. Gelatinous cubes would have no problem sliding down a hallway made of other gelatinous cubes (that's literally what they are made for) and they would have no problem sticking to each other.
Fact: a bunch of stupid cubes (or cubical pillars) can do some pretty cool things. They could carry things (like ships) or position things (like armor plates). Properly souped-up gelatinous cubes could fire cubical cannonballs via hydraulic pistons.
And not only can the True Gelatinous Cubes hop up on their corners and spin around like kung-fu jelly (shit, that's a monster that deserves a write-up), but they can fire lasers from their cores.
Laser cubes, motherfuckers.
Fact: Big Hero 6 had a cool villain. Self-assembling microbot swarm = yes. Are there self-assembling gelatinous micro-cubes? Of course!
Masters of the Cube
They're flying wizard-oozes. They're called the Vudra. They're all telepathic and think that communicating via human mouth-flatus is hilarious.
There's a city in the Madlands is the city of Carnosus. They rule it from atop their wind towers (only accessible through 3" wide holes on the top floor). The city is made of gelatinous cubes. Sometimes the city's masters move it from place to place, mostly for magical reasons.
Vudra reproduce via fission. The parent splits into two smaller clones that retain all of their memories. In their eyes, all Vudra are as old as all other Vudra. They don't remember being young, and each one is ancient.
Vudra can also fuse together, which causes them to undergo genetic and mental recombination. This is their sex-analogue.
They don't have sex with their friends or lovers. That would destroy the entire purpose of having a friend or a lover. Instead, they have fuse with stronger looking Vudra when they are scared or stressed, or they fuse with enemies. (What better way to resolve a disagreement than to fuse into a single creature, negating their personal bias, and then select the better option.)
The Vudra have created a race of artificial humans that they call the Vudra-men, who have similar mindsets and biologies. They fuse together instead of having sex, and are capable of splitting into a number of smaller offspring (but these babies aren't the big-headed babies you'd expect; they're more like lemurs).
The vast majority of them are in the process of leaving the planet (through means undisclosed) and have promised that their most loyal vassals will be handed the keys to the city and the ioun stones of cube control.
But gelatinous cubes are really just their bread and butter. Really, they dabble in cubic golems. Stone, mostly, but cubes are preferred for when they want to really fuck things up. They also control slithering trackers (capable of following the merest scraps of molecular residue) and slithering racers.
HD 4 AC leather (from speed) Trample 2d6 acid
Move 36 Int 1 Morale 12
*Slither Over - Slithering racers don't engulf their prey, they slither over it, leaving a healthy layer of acid, then circle around for another pass. When creeping, they creep as fast as any other ooze. But when food is at hand, they slither twice as fast as a sprinting horse. This great speed, coupled with poor senses, gives them -4 to hit, but they are capable of hitting anyone in the path of their great slither.
Gelatinous Cube Mounts
You'll need a snorkel, a ring of ooze command, and a ring of acid resistance. The rest is cake.
The city of Asria could also be described as the building of Asria. It's a castle-arcology, contructed prior to the Time of Fire and Madness and then expanded and retrofitted by the city's current rulers.
There's a lot of interesting things in Asria (jellyfish farms, canopy beds that cause stasis-sleep) but they do notably use gelatinous cubes for things like pumping water and controlling doors. A little bit of magic stolen long ago from the Vudra, of whom they've never heard.