templating the array class