The interaction between things that happen abroad and the constitution is complicated. Most constitutional rights apply to anyone
within the United States, including noncitzens, so you're correct there. Some dispute over specifics, like the 2nd - I think there's a circuit split on that.
As far as outside the United States, it's a lot harder to say and cases have been really mixed. At the very least, per
Boumediene v. Bush and related cases, the writ of habeas corpus can also apply to foreign nationals detained by the US Gov. outside the United States. But there have been a few cases with allegations of clear constitutional violations abroad, even against US citizens, that have been rejected.
https://en.wikipedia.org/wiki/Meshal_v._Higgenbotham. There's also this recent case: Mexican teenager was shot while in Mexico by a border guard in the United States.
https://www.supremecourt.gov/opinions/16pdf/15-118_97bf.pdf. Court dodged the extra-territoriality element.