If you need to provide a minimum of 75% probability that randomly selected elements will be in the first 1/10 of the array:
let max = config.targets.length; if (Math.random() < 0.75) // с вероятностью 75%... max /= 10; // ...сокращаем диапазон до 10% от кол-ва элементов let idx = Math.floor(Math.random() * max); // это результат, "случайный" индекс элемента
"Provide" is conditional ... In practice, in some cases it may turn out to be slightly less (the amount of deviation depends on the number of elements, first of all).
const config = { targets: new Array(100) }; let max = config.targets.length; for (let i = 0; i < max; i++) config.targets[i] = i + 1; const rndTarget = () => { let cMax = Math.random() >= 0.75 ? max : max * 0.1; return config.targets[Math.floor(Math.random() * cMax)]; }; const testVol = 250; for (var test = [], i = 0; i < testVol; i++) test.push(rndTarget()); const tenPercentCount = test.reduce((r, v) => r += v <= 10, 0); console.log(`Из ${testVol} случайно выбранных элементов, ${(tenPercentCount / testVol * 100).toFixed(1)}% в первой 1/10 части массива.\nЧисла:\n${test.join(', ')}`);