Walls drop upon collapse. For example,
WWWWW
W W
WWWWW
as a side view, this is a box made out of walls. After collapse, it will hit the floor looking like,
W W
WWWWW
WWWWW
because each wall settles to the lowest point it can. Floors do this as well. But only natural. A constructed floor/wall will revert to its building material when it hits the ground, and only the topmost layer will remain usable, as the lower materials are instantly crushed by the layer above them, leaving a perfect 1 layer thick pile of loose stones.
The water-filled cave-in box sounds like it needs some testing, although any dwarf that can swim could survive in a 7/7 pool, so being exact about it isn't as required. It would doubtless be best to - very quickly - take a slab of obsidian with walls. Fill it with water, and deposit the passenger in the water. Overfill it with water, so that the water is 2 layers deep, overflowing the obsidian walls. Then pour magma over it to cast the ceiling - poured from one side so that every ceiling tile is supported and none end up caving in, which would happen if you simply dropped a layer of magma on it. Quickly cut away any excess obsidian, attach supports, and let it fall. The biggest challenge here, is probably attempting to cast the obsidian before the dwarf dehydrates, although that's not a huge issue.
For this method, I'm expecting one hilarious bug. A cave-in into liquid displaces the liquid directly upwards. By this logic, a box filled with water would drop an empty box onto the ground, and the water would splash over it a moment later. This is still a very interesting idea, if it works it would let you place one wall tile as a constructed wall. Upon dropping, the constructed wall would disappear and drain the water out, instantly deploying your military and/or nobles safely to the goblin siege.