(a) This chapter applies to and determines rights, obligations and remedies under a rental agreement, wherever made, for a dwelling unit in this state.
(b) Unless created to avoid the application of this chapter, the following arrangements are not governed by this chapter:
(1) residence at an institution, public or private, if incidental to detention or the provision of medical, geriatric, educational, counseling, religious, or similar services;
(2) occupancy under a contract of sale of a dwelling unit or the property of which it is a part if the occupant is the purchaser or a person who succeeds to the interest of a purchaser;
(3) occupancy by a member of a fraternal or social organization in the portion of a structure operated for the benefit of the organization;
(4) transient occupancy in a hotel, motel, lodgings, or other transient facility;
(5) occupancy by an employee of a landlord whose right to occupancy is conditioned upon employment substantially for services, maintenance, or repair to the premises;
(6) occupancy by an owner of a condominium unit or a holder of a proprietary lease in a cooperative;
(7) occupancy under a rental agreement covering premises used by the occupant primarily for agricultural purposes;
(8) occupancy under a rental agreement covering premises used as part of a transitional or supportive housing program that is sponsored or operated by a public corporation or by a nonprofit corporation and that provides shelter and related support services intended to improve the occupant's opportunity to obtain permanent housing.