It wasn’t exactly Lana Turner at the soda fountain, but the manner in which filmmaker brothers Benny and Joshua Safdie happened upon Arielle Holmes, the lead actress and muse for “Heaven Knows What,” their searing tale of drug addiction and homelessness among New York teens, was perhaps even more unbelievable.

After their Spirit Award-winning semi-autobiographical feature “Daddy Longlegs,” the brothers were hoping to mount a genre film set in Manhattan’s Diamond District, titled “Uncut Gems.” In accordance with their almost gonzo style of research, Joshua Safdie and producer Sebastian Bear-McClard were working undercover in the district to gather material, where Safdie spotted Holmes getting on the subway.

“I said to Sebastian, ‘that’s the most beautiful girl I’ve ever seen, she’s so unique,’ ” he recalls. “Wearing a dress, very well put together. I went up to her speaking in Russian, assuming she spoke Russian, and she responded with a harsh, harsh Jersey accent. And I immediately was smitten by her.”

When Safdie arranged a second meeting in Chinatown, however, Holmes presented a far different side.

“She was wearing dirty jean shorts and a comicbook shirt, looking like she’d been out for a couple days, and nodding out a little bit. She tells me she dropped out of high school at 15, and she admits that she was homeless. She was 19 at the time. She started talking to me about this very mysterious boyfriend of hers named Ilya, as if I had known him for years. I said, ‘I don’t know if you’re right for this Diamond District movie, but let’s keep talking.’ ”

Safdie arranged a job for Holmes on a musicvideo shoot for Richard Kern, and Holmes never showed up, her phone disconnected. As weeks went by, Safdie feared for the worst, until finally she called him, having just been released from Bellevue after a suicide attempt.

The brothers convinced Holmes to write her life story, which she hopes to publish as “Mad Love in New York City,” and began adapting various incidents for a screenplay as she wrote, along with “Daddy Longlegs” lead actor Ronald Bronstein.

Holmes agreed to star in the pic. To portray her bad news boyfriend Ilya, the Safdies turned to Caleb Landry Jones, and the actor embraced the Safdies’ experiential shooting process wholeheartedly.

Both Safdies acknowledge the film’s debt to “Panic in Needle Park,” as well as Larry Clark’s “Kids” and Mike Leigh’s “Naked.”

Yet they endeavored to structure the pic more like an opera, with an intense, at times uncomfortable, close shooting style and a soundtrack full of Isao Tomita’s eerie electronic renditions of Debussy pieces, which occasionally drown out the conversations.

“Yelling to be heard and no one can hear you: that’s addiction,” Joshua says. “The way someone can be so overtly in your face and yet so invisible at the same time.”