Adding cmd_to_int_arr function