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?
LGTM pending Jeff's test request @jreback,
> also you are referencing 2 issues. can you add tests that are in these issues.

Tests for #35436 and #34857? Those issues are not fixed by this PR. Even if I add tests, they'd fail. Unless you mean something else which I am missing.

I tried @jbrockmendel's suggestion. `if values.shape[0] != labels.shape[0]` works. What do we want to use? Py_ssize_t cdefs, or `.shape[0]`?

Also, should the `len(values) != len(labels)` check be there in all functions? > Tests for #35436 and #34857? Those issues are not fixed by this PR. Even if I add tests, they'd fail. Unless you mean something else which I am missing

hmm thought i saw this, ok no prob then. thanks @jeet-parekh 