As a general rule, you don’t want to grab a strange cat because that strange cat might see you as a threat and rip all the arteries out of your body. Instead, you should approach any strange cat with caution until the cat either decides you’re friendly enough to get near or the cat flees from your sight.
Remember, the behavior of your own cat may not accurately reflect what other cats may think. So if your cat likes getting its head scratched, another cat might see your hand reaching for it as a threat and freak out in panic, ripping your skin to shreds in the process. When in doubt, assume the worse and hope for the best.