Can you please update the template to have methods for char data type and for taking array as input? maybe a function using generics