As others have said, there are lots of gray areas. And gray areas can be risky and threatening.
I have a pretty high tolerance for social interactions with strangers. In fact, I often find myself passing the time at an airport, or someplace else where there’s an unexpected wait, chatting up some man I’ve never met before and talking about engineering, or breeds of dogs, or some other innocuous topic the guy knows a lot about. So take my examples as the reactions of a woman who is pretty comfortable talking to strangers:
The location matters: Is it well lit? Is it easy for me to escape? Are there lots of other people around? Is it easy to attract official “security” or friends? These all make the interaction less threatening. There’s a reason I talk to strangers in airports more than when waiting for the subway to arrive.
Is your opening comment one with obvious non-sexual value if it’s uttered here and now? “Do you know where the entrance is to the subway?” “I was told there was a CVS around here, but I can’t find it. Do you know where it is?” “Excuse me, you just dropped this.” are all a lot less threatening than “that’s a nice blouse” or “Hi, I’m Matt.” In between might be something like “Oooh, Is your t-shirt an original Grateful Dead t-shirt from their Rockport concert in the 70s? I used to have one of those, but it was eaten by my washing machine, and I’ve been wondering if anyone sells them on-line.”
That’s for strangers. Of course, the stranger’s demeanor also matters, but it can be hard to judge how others will perceive you.
For acquaintances there are similar considerations. Have you trapped me somewhere private, or am I within easy sight of other people? Is it easy for me to escape if I want to? But there’s a lot more going one. What have our previous interactions been? How have I seen you interact with other people, both men and women? Are we actually friends? Friends can obviously be a lot more personal than casual acquaintances. My friend can pull me aside and say, “did you know your bra strap is showing? You might want to fix that” (or find a female friend to say that to me.) The guy I’ve been to two meetings with and haven’t really met can’t say that without it feeling a little skeevy.
=====
Can I tell if an utterance is innocuous? Often, but not always. Once, “excuse me, but I think you dropped this wallet” was said by a scammer, and wasn’t innocent at all. Another time it really was my wallet, and I was extremely grateful the person went out of her way to pick it up and attract my attention. (The first wasn’t a sexual threat, but yeah, it was a threat.)
Anyway, most women don’t like having strangers address them. And in particular, young attractive women are especially unlikely to like having strangers address them – they routinely get WAY too much dicey attention, and tend to find even completely innocent interactions to be an unwanted drain on their emotional energy. Remember, strangers DON’T owe you the time of day.
A good rule of thumb is that if you wouldn’t say it to a strange man, you shouldn’t say it to a strange woman. A second good rule of thumb is avoid “trapping” anyone, man or woman. That is, don’t address strangers in isolated situation where it’s not easy for them to run or attract the attention of others.