And about martial arts, nowadays they are seen more as a sport, so usually they are taught with the preconception of being used as such, in octagons and such (even though senseis and masters may say otherwise).
I've had my share of fights with people who trained martial arts (troubled childhood/teenagerhood) and i've learned through these that most fighting styles are taught within a situational range, if martial artists are caught out of their situational sphere (if they have no opportunity to use their moves) they'll be at least 50% more vulnerable.
Also: Fear activates our "RUN" instincts, which makes anyone involuntarly give a lot of opportunity to an enemy.
There's a big range of skill levels in martial arts. When you begin learning you are worse off in a fight if you try to apply your martial arts training. There's a point after a couple years where you get dangerous, even in sparring, and the next couple years is learning how to choose your target and how much force to use. Beyond that you get better at everything, faster, stronger, and learn new specialized techniques.
I agree with your situational assessment of martial arts. If you fight a shark, you want to fight him on the beach and not in the water. If you're a grappler, you're going to try to turn the fight into a grapple. Similarly if you're a long-legged striker you want to keep your distance. Learning within one school is problematic because everyone learns the same thing, meaning you rarely spar with someone trying to pull you out of your water and onto their beach. A specialist, striker or grappler, will be at a disadvantage if the fight becomes the opposite. A generalist is weaker in each than the specialist in his specialty; his goal will be to identify the specialty of his opponent and force the fight into the opposite. Two specialists or two generalists must rely on surprise, circumstances, and in their own morale, skill, and conditioning being greater than his opponent's.
In addition, people who are not trained can be dangerous mainly because they do stupid things that normal people don't predict. Such as exposure, telling, overextension, poor balance, lack of awareness. These can occasionally turn into "if it works, it ain't stupid" but 90% of the time the stupid move will get the inexperienced fighter hammered. And because he lacks conditioning he may be out of the fight.
In general, martial arts training prepares a person for a fight better than not training, except that in the first year a student shouldn't expect to be any better in a fight than if he hadn't trained. Take anyone who has trained as a grappling specialist for six years against someone who hasn't trained at all, and even in a striking fight the grappler will win. A grappling fight will be over almost instantly.
Further, because the untrained person lacks the moral training and understanding of how much he can hurt someone, he generally fights as hard as he can. A martial artist who fights as hard as he can may kill his opponent. A warrior who fights as hard as he can will kill his enemy or die himself. Because the martial artist is in the habit of holding himself back, of learning control and discipline, he may be at a temporary disadvantage compared to an untrained opponent. The "wild cat" fighter may win frequently against unskilled fighters, but against a reasonably well-trained and conditioned martial artist he will lose. Consider the differences in physical output between you and an Olympic track athlete. Training hard at something does make a human extremely more competent than an untrained human. On a bad day, just out of bed and still groggy, without breakfast, and giving you a 10 second head start any normal dude would still lose a race to that Olympic athlete. The same can be said of fighting. Then again, anyone can screw up (see: Figure Skating) and the best fighter can be blindsided. This is why tactical considerations like surprise and circumstances like weather, lighting, nearby friends, positioning, your leg being asleep, etc. can affect a fight so tremendously.
Finally I've found that the competent, confident martial artists tend to not get into fights. It's the young guys who have Bruce Lee as their ringtone and work as a bouncer just so they can beat people up, who lack confidence in themselves, who don't care about anything but punching real hard and having big muscles, who end up on the evening news.
Dunning-Kruger suggests we can expect that the people most sure of themselves are somewhat correlated with people who have poor skills.