The form that you describe is Form IT 203-A. If you were paid as wages reported on Form W2 as you state, that is not the method of allocation you will use in New York. Rather, you will use Form IT 203-B, Nonresident and Part-Year Resident Income Allocation And College Tuition Itemized Ded.... The general method used on that form is Allocation based on days worked in New York.
Through this method, your working days in New York will be divided by the total number of working days in the year. That percentage will be applied to your total income to produce the New York portion, which is the income you will pay New York tax on. Arizona, your home state, also taxes this (and all) taxable income, but will give you a credit for the tax you pay to New York on this same income.
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"