Add array 'sorted' function (to duplicate and sort list) and 'copy' function