I've already invented forms and start tibbits of this technology a year ago, but it never really took off as I wanted the game better optimized first and I was doing just that a year ago. But I do see this coming in in the near future. Perhaps even units just automatically find their place on the walls if they are a battalion. although it may not be a instantaneous thing it will take a few mins before they fully align. If we are to do it it must be lagless and not add more lagspikes into the game. Such as a town hall war bell or building walls; and it will be after any sort of pathfinding update and melee combat AI update as well as unit tasking update.
Now as to reply your post
Of course If a Unit has Manned a Wall, Tower, Staircase or Gate
it will get Bonusses which will Replace the Formations Bonus and will Work as Bonus for their Positional Advantage
Units on the Tower will get 30% Increased Range and 50% Increased Armor against Piercing Attacks
Units on a Wall will get 10% Increased Range and 30% Increased Armor against piercing
(special Bonus for the Rooftop Upgrade)
Units on a Staircase will get 50% Increased Armor against Slashing and Crushing as well as 20% Damage Bonus to their Weapon
Units on a Gatehouse will get 20% Increased Range and 60% Increased Armor against Piercing Damage
Units inside a Gatehouse will get 30% Increased Damage Bonus to their Weapon and 30% Bonus to their Health and all Armors
The defender already has a major bonus which is defending, walls always give a massive bonus, so i completely disagree with all bonuses except i like the idea of removing formation bonus. Attacking walls in real life in midevil times normal requires 3 times asmany soldiers than to defend. The same issue can apply here, we got bottle necks at gatehouses and stairwell aswell as boiling oil and other stronghold upgrades, archers' range already does increase with height so archers on a tower do already shoot further, the attacker is going to have some major problems if he is equal in forces as the defenders.
Why do you think Kon beats GPS so much? Cus he forces GPS to siege him!