When you finally get past the event itself you'll see it for what it was. A very real no win situation for you. There are times when anything you do is wrong, it's just a matter of degree. If he was under age, and you successfully resisted his robbery attempt, and he was injured, or killed by you, you lose. You've seen it happen a thousand times in the news. The crying mother, an outraged community, a crusading D.A., every activist & politician coming out of the woodwork to get their face on television. He was a good boy, yada, yada, yada. You know the drill.
Some things to consider: He might have had backup you never saw, it's more likely he did than didn't. The more time you spend in that kind of environment the more you see whats really taking place. Guys on corners that never cross the street, guys at bus stops that never get on a bus. They never work alone, and their work is finding a mark. Someone that has something worth their trouble. you know how it works.
The best solution of course is not to be there to begin with, but if work takes you there, that's just life. Keep your head on a swivel, try to make all the green lights, but if you do get stuck at a red one, watch both your mirrors & the sidewalks, keep everything locked all the time, & try to always have a co-worker. Four eyes are better than two, & safety in numbers.
Not talking down to you, just reading my own mental checklist I used to have. I don't go there anymore, ever. I live in Nevada, in the desert.
The hills here do have eyes. But that's okay, because they're mine.
Glad you made it through okay. You'll be fine.