How to mock one element in an Array in javascript test

I’m writing a javascript test, and am trying to mock one element in an array, I’m not sure this is the correct way to say it, but this is what I’m trying to do.

const arr = [1, 2, 3];
arr[0].mockReturnValue(4); 
//so in the end, I want the array to be [4,2,3] when I pass it into another function. 

Is there anyway I can do this?