Hashing ExtensionArrays which factorize to scalar objects with __getitem__ attr fails
```python
import pint
import numpy as np

from pandas._libs import hashing
ureg = pint.UnitRegistry()
encoding='utf8'
hash_key='0123456789123456'

vals=np.array([(i*ureg.kilogram) for i in range(0,3)],dtype=object)
vals
```

array([<Quantity(0, 'kilogram')>, <Quantity(1, 'kilogram')>,
       <Quantity(2, 'kilogram')>], dtype=object)


```python

hashing.hash_object_array(vals.astype(str).astype(object), hash_key, encoding)
```


----> 1 hashing.hash_object_array(vals.astype(str).astype(object), hash_key, encoding)

ValueError: setting an array element with a sequence


#### The issue here is in this part:

```python

vals.astype(str)
```

----> 1 vals.astype(str)

ValueError: setting an array element with a sequence


#### Problem description

The scalar objects held by an ExtensionArray cannot have a `__getattr__` method, else coercing the array of scalars to string will fail. This is an issue when creating an ExtensionArray for pint, which uses the same object to hold scalars and arrays. For more info see https://github.com/hgrecco/pint/issues/743

This is a known numpy bug. See https://github.com/numpy/numpy/issues/9441

