That is a bad example that you used. And like khattichic mentioned, you cannot compare mangoes with people, countries and religions.
By making negative generalizations you do unjust to the majority of the people belonging to that particular group. And yes, the negative generalizations are always due to a minority that does not represent the whole group.
Yes making generalizations is a part of our lives, but that is because as humans we are imperfect and have misconceptions and prejudgements about others, and not because the generalization are truth/right. So making generalizations are the result of our own wrong perceptions.
Problems exist everywhere, troublemakers are evrywhere. You acknowledge the problem by it’s core and by tackling the troublemakers. Not by throwing everyone into the same pot.