Can't use const array without warning or casting.

It's a bit of a pain, but it seems you can't pass in a non-const array. It
considers a different type and won't cast.

Wrote a unit test for the copy map functions, seems there's only one difference
between the two functions. Considering making it one function for both.