As per comment, use array_merge instead of two for loops to create range indexes