use rb_ary_entry() and rb_ary_subseq() instead of RARRAY_PTR

Hello,

cparse.c has been updated recently in MRI repo, so this is the corresponding change
(guessing this is the canonical repository now?).
See MRI Bug #8399: https://bugs.ruby-lang.org/issues/8399 .

Ideally it should be applied on master as well.

I wonder, is the check in the AREF macro needed?
It seems unnecessary from running the tests and removing it.