intersectGet the intersection of two arrays arr1 and arr2, returning a new array containing elements present in both arrays.
arr1 (T[]): The first array.arr2 (T[]): The second array.T[]): A new array containing elements present in both arrays.