CA and AZ are reverse-credit states. This means that both states tax the income, but only the non-resident state offers a credit. Therefore in your case you should prepare your resident state return first, before you complete your non-resident state return - which is the opposite of the usual sequence.
**Answers are correct to the best of my ability but do not constitute tax or legal advice.