HPCC-12290 Reimplement jarray using templates

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
worth sticking to one of them to be consistent.
One reason I prefer SELF:: is that it is often used in conjunction with a PARENT:: , so seems more analogous