Make type declaration and arg list processing of ScanTemplate same as ElementwiseTemplate.