vas88811,
var arr3 = [5, 8, 6, 9];
var arr4 = [1, 3, 7, 5];
var arr5 = [];
for (var x=0;x<arr4.length;x++){
arr5[x] = arr4[x] //сохраняем структуру arr4 в arr5
}
arr4.sort(function(a,b){return b - a});
var arr6 = [];
for (var n=0;n<arr5.length;n++){
for (var x=0;x<arr4.length;x++){
if (arr4[n]==arr5[x]) {
arr6.push(arr3[x]);
} }}
alert(arr4+'\n'+arr6)