parallel_repeat now use random access iterator to output values