More constness checks
Merge pull request #2576 from nordlow/inout-array-take2

More constness checks for #2573