§ 7001. Application of article; special proceeding. Except as otherwise prescribed by statute, the provisions of this article are applicable to common law or statutory writs of habeas corpus and common law writs of certiorari to inquire into detention. A proceeding under this article is a special proceeding.