IF the majority of random mass shooters have mental health impairments, it doesn't at all mean that the majority of people with mental health impairments are potential random mass shooters.
I don't know whether most or even many mass shooters are mentally ill anyway, though that's the impression left by news coverage. It seems like something that can be measured and known for sure, but I'm not sure where to find that information. But if it IS true, it says very little of any use about people with mental illness in general. It might, however, suggest that better understanding mental illness might help us understand random mass shooters, which might help prevent these terrible incidents.