Functions with array as a parameter variable