add const to encodeArray and DecodeArray to match codec.h