ValueError: buffer source array is read-only
#### Code Sample, a copy-pastable example if possible

```python
>>> index = pd.date_range('2020', 'now', freq='1h') 
>>> arr = np.zeros_like(index) 
>>> arr.setflags(write=False)
>>> pd.Series(arr, index=index).resample('1d').agg('last')

-------------------------------------------------------------------------
~/pandas/pandas/_libs/groupby.pyx in pandas._libs.groupby.group_last()
~/pandas/pandas/_libs/groupby.cpython-37m-x86_64-linux-gnu.so in View.MemoryView.memoryview_cwrapper()
~/pandas/pandas/_libs/groupby.cpython-37m-x86_64-linux-gnu.so in View.MemoryView.memoryview.__cinit__()
ValueError: buffer source array is read-only
```
#### Problem description

Groupby fails on some read-only buffers (I couldn't quickly reproduce it with `.groupby()` itself, sorry).

The prime solution would be to add `const` specifier to the input `values` here (and related entries):
https://github.com/pandas-dev/pandas/blob/0b6debf825db39f8f63d300cb8007a7996d002fc/pandas/_libs/groupby.pyx#L853

if it were not for Cython's non-support of const fused types (https://github.com/cython/cython/issues/1772), resolved in (https://github.com/cython/cython/pull/3118), but despite [miniscule change](https://github.com/cython/cython/pull/3118/files?file-filters%5B%5D=.py) only scheduled for release in Cython 3.0. I guess wait until then.

#### Expected Output

Resampling/groupby works with read-only arrays.

#### Output of ``pd.show_versions()``

pandas 1.1.0.dev0+361.gf0b00f887
cython 0.29.14
