templating the array class for performance reasons