title: how to do multiple array_union and array_intersection in pyspark
body: <p>Let's say I have a pyspark dataframe containing the following columns: c1, c2, c3, c4 and c5 of the array type.
  Now If I want to do:
  (c1) intersection (c2 union c3) intersection (c2 union c4 union c5)</p>
  
  <p>I can use array_union on two columns in a loop and keep adding a column with the help of withColumn and then do a round of intersection similarly. </p>
  
  <p>How can I do this in PySpark efficiently? Is there a smarter way to do this? </p>