When masturbating I usually think about scenarios rather than about particular people in real life. For example I have a lot of kink fantasies/nonconsent fantasies. However these fantasies are not things I would want to happen to me in real life (ie they're dangerous, immoral/illegal). And in the fantasy these scenarios aren't happening to me (as in my real self with my real feelings and personality), I'm thinking of them in third person mainly.
If I do think about real people, it's usually people I have a connection with, such as my partner.