HPCC-12290 Reimplement jarray using templates

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Any reason for not correcting that as part of this change?