If grenades can be tossed out, can they also be tossed in?
Some designs. The Germans mounted their infamous "bouncing betty" mines outside the turret much as modern tanks now have smoke dischargers, fired electrically. With earlier designs there were a few internally-operated escape hatches or direct viewports one could drop a grenade out of or shoot a pistol through. Some designs, such as the Soviet IS-2, had a rear-facing machine gun on the turret that could "sweep" the engine deck or a tank farther back in a column.
Interestingly I'm finding that the Abrams fire extinguishers use halon in concentrations safe to breathe, just mildly annoying. Where's Strife? But that's definately the lever. I imagine if there were a problem with OPFOR actually getting that close to a tank (A.) we have a serious problem with our tank's forgetting the wingman system and infantry forgetting to defend the tanks from close assault and (B.) some irritated sergeant would weld a metal sheet over it.
The current parlance to request close-assaulting infantry be removed from your vehicle is "scratch my back". The Germans did this frequently on the Eastern front, where gasoline bottles and crowbars were sometimes all Soviet troops had to kill tanks. The Germans on the other hand had the
fan freaking tastic idea to put a couple big magnets on a hollow-charge warhead with a hand grenade fuse. The result?
Die Hafthohlladung 3
Quite possibly the best hand-held tank killer ever devised, in terms of sheer penetrating power. Unscrew the little knob at the top, stick the magnets against the armor plate, and pull the knob which is attached to the fuse assembly. Five seconds later and you've a hole through 140mm RHA. Getting close enough is quite difficult, of course, but it was tremendously effective in ambushes, close fighting, or defending trenchlines.
Also, apologies for using a photograph from apparently a rather distasteful site. It was the best thing google image search could produce.