Pretty simple, start with array [1, 2, 3] (representing offsets from current month) and map it to the array you want.
function getNext3Months() {
const currentMonth = (new Date()).getMonth() + 1; // getMonth() is zero-indexed; add 1 to give conventional month number.
return [1, 2, 3].map(n => (currentMonth + n) % 12); // returns array of next three conventional month numbers; %12 caters for end of year wrap-around.
}