Seems to me that, right there on the bottom left part of page 8 of the instructions for Form 140PY, it says
ARIZONA COLUMN
Enter that portion of your federal income received while you were an Arizona resident in the ARIZONA column. For example, if you became an Arizona resident on June 30, enter all income you received from that day to December 31, 2021.
NOTE: If you also have Arizona source income for the portion of the taxable year you were an Arizona nonresident, also include that source income on the appropriate line in the ARIZONA column.
The Tax Reform Act of 1986 limits the amount of losses that you may deduct from passive activities. A passive activity is one that involves the conduct of any trade or business in which the taxpayer does not materially participate.
As a part-year resident, your Arizona gross income may include some of these losses. For the part of the year you were an Arizona resident, you may consider any passive losses that arose while an Arizona resident. For the part of the year you were an Arizona nonresident, you may consider only those passive losses that arose from Arizona sources. Your 2021 Arizona gross income can include only losses you used on your 2021 federal return.
. Emphasis mine.