Generate array validators before generating the for loop for its items.