After doing some research, this is what i found when retrieving a sample of size N from an array 
- Shuffle the array
- Slice the shuffled array to get sample of size N
NOTE: The shuffleArray function was created with the help of this question
 and answer
Below are the two functions that solved the problem
// Function that shuffles an array
const shuffleArray = array => {
  if (array.length === 1) return array
  const randomIndex = Math.floor(Math.random() * array.length);
  const randomElement = array[randomIndex]
  array = array.filter((_, i) => i !== randomIndex)
  return [randomElement, ...shuffleArray(array)];
};
// Function that returns sub array from array
const subArray = (array, n) => array.slice(0, n)
const population = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
const shuffled = shuffleArray(population)
console.log( shuffled )
console.log(subArray(shuffled, 4))