Most common R vector types are converted automatically to a suitable Arrow data type without the need for an extension type. For vector types whose conversion is not suitably handled by default, you can create a vctrs_extension_array(), which passes vctrs::vec_data() to Array$create() and calls vctrs::vec_restore() when the Array is converted back into an R vector.
ptype: A vctrs::vec_ptype(), which is usually a zero-length version of the object with the appropriate attributes set. This value will be serialized using serialize(), so it should not refer to any R object that can't be saved/reloaded.
storage_type: The data type of the underlying storage array.
Returns
vctrs_extension_array() returns an ExtensionArray instance with a vctrs_extension_type().
vctrs_extension_type() returns an ExtensionType instance for the extension name "arrow.r.vctrs".