Edit cartesian_product function to work with more than 2 arrays.