Refactor mrb_f_array func