i know this kind of goes against the grain of roguelikes in general, but I'd like my dragons to be a bit larger than other stuff on the map. I'm going to skip most of the argument on why we should or shouldn't do it (You're welcome to argue that though) and get straight to one possible implementation.
oD~ Dragon
~
~O~ Giant octopus thing
~
s~~ Really large snake
Extra body part would trail behind the "head" of the creatures on a possible to fit basis. If a dragon is stuck in a 1x1 pit, the head and tail will simply retract into the body. Same goes for the giant octopus, if it enters a narrow hallway the side tentacles are pulled back into the body tile.
In combat, aiming at a particular tile will only harm those body parts that are within that tile. A dragon with lots of room to move around could have the head, body and tail targeted separately. In more cramped quarters you would simply attack the normal dragon tile. Likewise, melee attacks would rely on the body part with the attack being adjacent to the target. A dragon could wedge themself in a narrow hallway and defend themself from the front by breathing fire and from the back with tail slaps, while their vital organs are perfectly safe in the middle tile, unless some fool really wants to crawl under the dragon to get at its belly.
The system would be limited in that it would not prevent the dragon from moving its head back across its body and turning around in one place.
In the raws the creature would be created using a tiling system of leading, trailing, left, and right tile parts. Body parts would then be assigned by tag to whichever tile they would appear in.
Figuring out stance might be more difficult, as a creature with a long neck should theoretically be able to reach across a moat and attack thing on the other side, but must be limited in its movement away from the supporting leg structure, which would cause the whole creature to fall into the moat if it tried to follow the head.