add union_arrays function in order to merge two arrays distinctly