fn take_impl<IndexType: ArrowPrimitiveType, const CHECKED: bool>( values: &dyn Array, indices: &PrimitiveArray<IndexType>, ) -> Result<ArrayRef, ArrowError>