(a) The corporation may retain dwelling units in a project to the extent it determines necessary and appropriate, for sale, lease, or rental to nonprofit organizations and government agencies. The dwelling units shall be used by the nonprofit organizations and government agencies to provide housing opportunities and related support services to special needs individuals or families. These purposes include but are not limited to the use of dwelling units for group homes and congregate living facilities and for government employees in special situations. The corporation, in consultation with other appropriate government agencies, shall adopt rules pursuant to chapter 91 necessary to implement this subsection, including but not limited to rules relating to the eligibility and qualifications of nonprofit organizations and government agencies; the eligibility and qualifications of clients of nonprofit organizations and government agencies to whom housing opportunities may be made available; and restrictions on the use, sale, or transfer of, and authorizing repurchase of, dwelling units sold, leased, or rented pursuant to this subsection. The corporation, to the extent appropriate, shall have the same powers with respect to nonprofit organizations and government agencies purchasing, leasing, or renting dwelling units as the corporation has with respect to qualified residents purchasing, leasing, or renting dwelling units.