1.There is the tutorial on that, which someone already posted.
2.You can do a gun system using dark swarms although it doesn't work well for multiplayer,
here is a tutorial on it.
3.If you want to stop air units and ground units place a location outside the map using starforge. then make a trigger to constantly, using hypertriggers, teleport the unit there, you just have to constantly teleport the unit to a place it cannot be teleported to. Although this makes it so it is very hard to select the units being teleported and they can still attack and use spells.
4.EUD conditions can detect things that would normally be undetectable but are stored in memory, making them detectable using special triggers. Every patch starcraft scrambles the EUD offsets (don't make me explain) so at the moment no one knows the new offsets that work with the 1.14 patch.
5.Cloaked units are hard to detect, one way would be to see if they attack a unit, since cloaked units do not attack on their own or without holding position they won't attack it, although this isn't a very good way to detect it.
6.I didn't really get that one...If you want to change the hangar amount just select the unit and go to properties.
7.You cannot make two locations run the same action, you have to make seperate actions for each, there is no way to name them the same, if you do you'll just get something screwy.