Update toKeyValue to stringify key/value pair with arrays.