for-each-ref: introduce 'ref_array_clear()'