I'm somewhat confused by the different types of non-Citzens living in the United States and what rights are or are not afforded to them.

My limited understanding is that there are the following broad types of non-Citizens living in the U.S. *(please suggest an edit if the below is incomplete or wrong)*:

* **Green card holders:** People that applied to move to the US and are allowed to stay here until (1) their green card expires or (2) they become a U.S. Citizen
* **Visa holders:** They were sponsored by an employer or institution to go to the U.S. temporarily, with the expectation that they will leave when the visa expires
* **Refugees:** People fleeing conflicts or disasters that are permitted into the U.S. (indefinitely?) for humanitarian reason.
* **Illegal (or undocumented) immigrant:** Someone who entered the U.S. through non-official means
* **Foreign delegates:** Leaders at the U.N. and diplomats in the United States for international relations

Do constitutional protections apply to the groups mentioned above? For example, do green card holders have rights to free speech, protection from unwarranted search and seizure, and other rights afforded by the Constitution? Are illegal immigrants protected from cruel and unusual punishment?