Specific emphasis on Vietnam, as it sounds as if Ken Burns’s documentary on that conflict suggested that since North Vietnam and the US weren’t formally at war for the conflict, they weren’t bound by international law as regards their treatment of POWs.
Edit: I’m asking specifically about the US’s conflicts from 1950-1998.
Are you referring only to conflicts that the United States has been involved in and what its theoretical obligations/actual detention regime was or just as a point in general about all conflicts everywhere in the second half of the 20th century?
There's a whole body of international humanitarian law that has developed over the course of the 20th century that I can speak to to some extent in general and some of the distinctions there, but the specific case of Vietnam is not one that I'm all that intimately familiar with.
Unfortunately the examples that I'm most familiar with are the post-9/11 cases like Hamdi v. Rumsfeld and therefore violate our 20-year-rule.
Perhaps the most important thing I would say is that you are incorrect that a "formal" existence of a state of war is necessary to create international humanitarian law obligations. That is not the case. The relevant status is not whether a state is at "war", but rather in a state of armed conflict. The wider body of law in regards to what is permissible generally under these circumstances and when they actually arise is called the Law of Armed Conflict (often abbreviated as LOAC.) For example, the 1949 Geneva Conventions are held to mean that:
"any difference arising between two States and leading to the intervention of armed forces is an armed conflict within the meaning of Article 2, even if one of the Parties denies the existence of a state of war. It makes no difference how long the conflict lasts, or how much slaughter takes place."
That ICRC opinion paper in general is a good introduction to some of the issues involved.
Others include whether or not within the context of a conflict a specific actor is bound by international humanitarian law. That tends to be a highly specific question with a case-by-case answer. While their particular example violates our 20 year rule, this article examining the applicability of international law to ISIS is a good example of the kinds of obligations that these non-state groups have and what current problems exist in the applicability of international to them (notably that "terrorism" is a poorly defined category in international law). NB, this is a direct PDF download link: https://www.gcsp.ch/download/6501/152083