I'm sorry that happened to you. That man was pure gutter! I had been harassed since way back into my childhood, and it wasn't always old men. I get harassed by old women also. It was because I had a popular mother who had plenty of haters and they thought they'd get at her kid. To make a long story short, these experiences have turned me into a hardened woman by the time I got to this age. Few people choose to mess with me these days.
If I were you, I would have stayed away from him when he started ranting. When he got close, I would have quickly moved away from him. If I had to run out of the place like a fool, I would. If there are obstacles and I can't get away from him, I'd make the ugliest face I can muster so he'll lose interest in me. If it still doesn't work and he's still coming at me, I'd scream something that'll make everyone look in my direction ("fire" is the most effective word). If nobody cares, I'll fight him in any way I can. When he reached you with his hand, you should have grabbed his hand and twisted it. Do not be afraid that he will press charges because that will only force him to explain to a jury why his hand was on your butt, what you do is clearly out of self-defense.
Again, I'm sorry it happened to you. It's not your fault and see this as a learning opportunity so you will be prepared next time.