Realistically, the conversation can go something like "hey, i'm going to the break area for coffee, wanna come?" ... "So how is your work going?" ... "Huh, that sounds ... Anything I can do to help?"
If you're completely risk averse but still want to be a supportive male, you can have this entire conversation without bringing up that they're a woman.
Alternatively, If you want, you can make a passing comment, maybe with a joke, like, "Just wanted to check in because engineering can be a boys club sometimes. Want you to feel like you're in the club." Maybe you can say "It's a little dorky, but I read this interview where a female engineer suggested talking directly to women about their experiences and it seemed like a good idea. I just wanted to see how this job is treating you."
As long as you don't leer while you say any of this, everything will be fine.