I agree with Haertig that in the urbanized situation you described and the situations you raised, I think getting other people to help you will probably pay the most dividends when it really counts. I'll take a different tack here and suggest a non-gear approach, in addition to the gear tips others have already put forward. If you often walk the same route and see the same people, try to be friendly and even get to know some people, whether residents, shop staff, or other walkers you regularly see.
Don't forget, the more people who are around, the less likely that any particular person will help you--it's a well known sociological effect (although the name escapes me at the moment). Even if there are buildings all around with occupants, I hate to say it, but your cries for help could go unacknowledged even if a dozen people actually peek outside. The only really effective antidote to that natural tendency is familiarity between the person in need and onlookers. The greater the personal connection, the more likely they will come to your aid.
Of course, there are plenty of examples of people doing extraordinary things for complete strangers, but that's often not the norm in many situations. If you're on the ground alone with a badly twisted ankle and the only people around are in cars driving by, there will be a great tendency for people to just drive on by, especially if you're obviously awake and not grievously wounded or unconcious, in which case they might feel compelled to call 911 as they continue driving on. Calling 911 really doesn't ask that much of someone. Seeing you attacked by a dog and coming to your rescue does. Or if you're on the ground with a badly twisted ankle which doesn't require an ambulance, getting ice and waiting with you until someone with a car comes or offering you a ride does require personal effort on their part. It's a natural tendency for many/most of us not to want to put too much effort for someone that you don't know at all, particularly when we feel like there are others around who could help you. Like a famous spouse once said, "It takes a village." In the wilderness, self-reliance is key, but when we're in the village, it sure helps to have the village on your side. Anyway, just my 2 cents worth.