You came upon a scene where there was a scuffle ...
You have no idea who or what may have started it and you yourself were in no immediate danger, therefore a better option would have been to simply call 911, in my opinion
You indicate that he was not in danger and yet the fact that 20 to 30 people were involved does not indicate to you that this was one group willing to engage those who do not want to be involved. It would seem to me that just being near the situation would be inherently dangerous unless you believe your martial skill is so movies like that you can handle 20 - 30 men in unarmed combat.
I get it that this was probably some gang activity but you not being a member of that gang doesnt mean some idiot doesnt want to add you to the activity simply for being there.
Having no idea of the specifics of what happened to cause this scene nor any factual information on who was involved leaves you with no factual picure to form decisions from other than what your eyes and ears presents to you. You cannot simply assume your color or lack or color or your absence of gang membership will make you immune from the incident and to assume such is nothing more than wishful thinking.
Without having been there its impossible to say what the right move would have been but I suspect that I would not have tried to protect anyone but myself or my family in this situation. Too many people involved to watch them all and how do you know that the one your protecting isnt actually the criminal or maybe in this case they were all criminals.... I dont know...
I think you called the situation right.