d3: add additional type parameter to array functions