HPCC-12290 Reimplement jarray using templates

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
doesn't having a non const operate[] definition, mean there is no point in const version?
I'm not clear when it will be invoked..