Ariz. Rev. Stat. § 36-540
A. If the court finds by clear and convincing evidence that the proposed patient, as a result of mental disorder, is a danger to self, is a danger to others or has a persistent or acute disability or a grave disability and is in need of treatment, and is either unwilling or unable to accept voluntary treatment, the court shall order the patient to undergo one of the following:
C. The court may order the proposed patient to undergo outpatient or combined inpatient and outpatient treatment pursuant to subsection A, paragraph 1 or 2 of this section if the court:
1. Determines that all of the following apply:
E. If the court enters an order for treatment pursuant to subsection A, paragraph 1 or 2 of this section, all of the following apply:
F. The maximum periods of inpatient treatment that the court may order, subject to the limitations of section 36-541, subsection D, are as follows:
H. In any proceeding for court-ordered treatment in which the petition alleges that the patient is in need of a guardian or conservator and states the grounds for that allegation, the court may appoint an emergency temporary guardian or conservator, or both, for a specific purpose or purposes identified in its order and for a specific period of time not to exceed thirty days if the court finds that all of the following are true:
I. The court may appoint as a temporary guardian or conservator pursuant to subsection H of this section a suitable person or the public fiduciary if there is no person qualified and willing to act in that capacity. The court shall issue an order for an investigation as prescribed pursuant to subsection G of this section and, unless the patient is represented by independent counsel, the court shall appoint an attorney to represent the patient in further proceedings regarding the appointment of a guardian or conservator. The court shall schedule a further hearing within fourteen days on the appropriate court calendar of a court that has authority over guardianship or conservatorship matters pursuant to this title to consider the continued need for an emergency temporary guardian or conservator and the appropriateness of the temporary guardian or conservator appointed, and shall order the appointed guardian or conservator to give notice to persons entitled to notice pursuant to section 14-5309, subsection A or section 14-5405, subsection A. The court shall authorize certified letters of temporary emergency guardianship or conservatorship to be issued on presentation of a copy of the court's order. If a temporary emergency conservator other than the public fiduciary is appointed pursuant to this subsection, the court shall order that the use of the monies and property of the patient by the conservator be restricted and not be sold, used, transferred or encumbered, except that the court may authorize the conservator to use monies or property of the patient specifically identified as needed to pay an expense to provide for the care, treatment or welfare of the patient pending further hearing. This subsection and subsection H of this section do not: