TST: avoid mutating DataFrame.values in tests (use iloc instead)
This is splitting off some "usefully anyway" test changes from https://github.com/pandas-dev/pandas/pull/51082

We have several places internally where we mutate the `df.values[..] = ..` directly, while this is certainly a discouraged pattern (also only work if you have a single block), and often easily avoided by using `df.iloc[..] = ..` or mutating the array before creating the DataFrame, instead.
thx @jorisvandenbossche 