(hi, i cant comment so
arima (1,0,0) = ar (1) need 1 previous observation
ar (2) need 2 previous observations
arima do calculate with training data value of coeficients
(for ar (1) its like: intercept and ar1
you can calculate coeficients arima(data[1:400]
or you can also arima(data[1:472]
(1) so you always need previous (current data) to make 1 step ...