def recursive_index_encode(int_array, max=<NUM_LIT>, min=-<NUM_LIT>):
out_arr = []<EOL>for curr in int_array:<EOL><INDENT>if curr >= <NUM_LIT:0> :<EOL><INDENT>while curr >= max:<EOL><INDENT>out_arr.append(max)<EOL>curr -=  max<EOL><DEDENT><DEDENT>else:<EOL><INDENT>while curr <= min:<EOL><INDENT>out_arr.append(min)<EOL>curr += int(math.fabs(min))<EOL><DEDENT><DEDENT>out_arr.append(curr)<EOL><DEDENT>return out_arr<EOL>
Pack an integer array using recursive indexing.

    :param int_array: the input array of integers
    :param max: the maximum integer size
    :param min: the minimum integer size
    :return the array of integers after recursive index encoding