BUG: groupby and agg on read-only array gives ValueError: buffer source array is read-only
- [x] closes #36014 
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

I found multiple aggregate functions that were failing for a read-only array. I applied the change suggested in #36014 to all of them.

A couple of questions.

1. I had to add the Py_ssize_t cdefs to suppress the error below for `len(values) != len(labels)`. Let me know if there is another preferred way of doing it.

```
error: comparison of integer expressions of different signedness: ‘Py_ssize_t’ {aka ‘long int’} and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
```

2. I see some functions don't have the `len(values) != len(labels)` check. Should it be there in all the functions?