Compare Two Arrays of Different Lengths and Return the Common Values

Unless you have a particular need for this to run as fast as possible, for arrays that small I wouldn't bother sorting them and would just brute-force compare the unsorted arrays element by element.

for each element in left array
for each element in right array
if left == right
append to results

If you want the results to be unique and the input arrays are not unique then I'd implement the append operation in a function that checked the new result against the values already in the result array.