added repeatedly, rand_int, of_array and to_array to Gen