implemented intersection that takes more than two arrays