Add test function and tests for integer arrays