Right now all shifts in the player's form have to be hardcoded. Complete changes to the player's body (as opposed to things like blade hands) instead be done via a generalized polymorph, where an attribute indicates the species of the polymorph target, and all of the information about the transformation would be taken from the data in mon-data.h. This would have several advantages:
1) It would be a lot easier to add new transform-to-monster transform types for existing monsters, and even for non-existing monsters a new monster entry could be added to take care of resists, attacks, and so on.
2) It should make the transformation code cleaner, since it most of it would no longer be a bunch of special cases.
3) It could be used to implement random player polymorphs. For example, wands of polymorph could truly polymorph the player, rather than causing mutations.
It would fix player speed vs. monster speed issues with transformations! Maybe. Random player polymorphs would be hilarious.
Mon-data.h may be hard to use like that since monsters and player seem to work differently and have different data/meaning of values. If to make some sort of value/property conversion from monsters to player then that may be even more code than current system that tweaks things on each transformation.
Perhaps it is better idea to prepare some sort of transform-data.h first for trying to handle transformations in a more generic way?
I have to agree with kotk. Things like speed and magic resistance work completely differently for monsters vs. player. Monsters don't use stats, so the stat boosts cannot be expressed that way, while the hit dice modifiers are completely useless for transformations. Even some resistances cannot be translated. Trying to bring the two closer (e.g. by overhauling the way speed is handled) is fine, but might take long enough that this goal seems a bit farfetched right now, and sorry, but random polymorphs wouldn't be worth it.
I also like kotk's suggestion of putting all the transformation information (including stat boosts, speed change, glyph, resistances, skill boosts, blocked equipment slots, maybe even messages) into a localized structure. That should achieve most of what you're trying to do, but in a much neater fashion.