Storing number of local steps in an array