Coded alternative for array_diff_merge as this method does not support multi-dimensional arrays.