HPCC-12290 Reimplement jarray using templates

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
You are linking the elements here, when you did not before. Why the change? Not saying it's wrong, just trying to understand the ramifications...