The first isn't really possible in the way that you want it implemented. You can make your armory add soldiers with armor to your city defenses, but you can't really "upgrade" the existing troops. All of the militias have set designs, and you'd have to design your own or switch the current militia to something that use armor (in which case ALL militias would get it, not just those from your armory).
The second, if I understand you correctly is really simple. Mana is just another resource, the spell cost part of spell can take any resource, custom or not. You basically make a spell that consumes 2 or 3 resource (including mana) to cast, and create whatever you want.