IntStream.range(0, numbers.length) .forEach(index -> { doubleNumbers[index] = numbers[index] * 2; tripleNumbers[index] = numbers[index] * 3; });