(a) If not otherwise released, every person arrested shall be brought before a magistrate without unreasonable delay, and in any event the person shall, subject to the limitations contained in subsection (b) of this section below, be so brought within 24 hours of arrest, unless the court, for good cause shown, orders that person be held for a further period not to exceed 48 hours.
(b) Persons unable to knowingly and intelligently participate in the presentment proceedings because of incapacitation as a result of the consumption of alcohol or the use of drugs may, until such time as they are able to meaningfully participate in those proceedings, be held in police custody or be temporarily committed with bail and conditions of release to the custody of the Department of Correction on order of and following a determination of incapacitation by a magistrate. This temporary holding or commitment should not exceed 12 hours from the time of commitment until presentment, unless the court, for good cause shown, orders that person be held for a further period not to exceed 24 additional hours.