The right to life and and liberty being basic human rights guaranteed under Article 21. Article 21 says that No person shall be deprived of his life or personal liberty except according to procedure established by law. Arrest of a person depriving his or her liberty implies serious consequences.
To protect the interest of arrested Persons Clause (1) and (2) of Article 22 of the Constitution guarantee the following rights -
1) The right to be informed, as soon as may be, of grounds of arrest,
2) Right to Consult a legal practitioner of his own choice for defence.
3) The right to be produced before a Magistrate within 24 hours, excluding period of journey from the place of arrest to the court.
4) No detention beyond 24 hours, except by order of Magistrate.
Right to be released on bail, if a bailable offence is committed by him.
The above fundamental rights guaranteed by Indian Constitution under Article 22 Clause (1) and (2) are available to citizens and non-citizen and not to persons arrested and detained under any law providing for prevention detention.