Just like there are some turrets that do not require any human drivers, is there a way to make a tank with these properties for example?

Also, I would like to know how can you make a tank's AA machine gun controlled from the inside, without the gunner popping out and exposing himself.

Thanks in advance =)