Move to separate array helper. Unit test.