Minor fixes in Com/JS/C++ array utilities