adding documentation for array_do_r