Can I run NM wire and put an electrical box in the same wall stud cavity as a metal HVAC supply duct
I see no problem with that at all. Both are independent of each other. If they touch, it sounds as if you need to provide some sort of non conductive material between the duct and box,, or use a plastic box.