have a look at jQuery Unique
with 1 line of code you sort and remove duplidates:
var myArray = <your array>;
var myUniquesArray =jQuery.unique( myArray );
EDIT:
here is a demo Fiddle
EDIT 2:
to merge all your arrays into one array, you can use
jQuery.merge(first, second);
it returns a third array with all the values from first and second
so what you do is basically go over all of your arrays and merge them into your final array:
see another demo Fiddle