Array is collection of variable of similar datatypes saves unser the same name.
while user definded function are like the store procedures but more effective than store proceures.we can pass the parameters to user definded funtion and it return u the results by doing the calulations which are mentioned in the funtions.
3 types of user definded funtions are there
1)Inline user defined funtion:use in the place of expression the the queries.
2)Inline table values user definded funtion: used in place of table in queries.