function handScoringHelper(hand) {
  // Create an array of all zeros of the appropriate size.
  const faceValOfEachGroup = [];
  for (let i = 0; i < GAME_STATE.num_cards_per_hand; i++) {
    faceValOfEachGroup.push(0);
  }
  let runLength = 0;
  let prevVal = 0;
  for (let i = 0; i < GAME_STATE.num_cards_per_hand; i++) {
    const card = hand[i];
    if (card == prevVal) {
      runLength += 1;
    } else {
      prevVal = card;
      runLength = 1;
    }
    faceValOfEachGroup[runLength - 1] = card;
  }
  return faceValOfEachGroup;
}
This function produces an array indicating the largest face value for
every possible group size (1 card, 1 pair, 3-of-a-kind, 4-of-a-kind, etc.),
in the hand.  Zeros indicate there are no groups of that size.

E.g., if this function returns [9, 3, 0, 0, 0, 0] it indicates that
  - The highest card is a 9
  - The highest double is of a 3
  - There are no triples etc.

This could result if the hand were, e.g,  [1, 2, 2, 3, 3, 9]

@param {number[]} hand A sorted integer array of length
    GAME_STATE.num_cards_per_hand
@returns {number[]} An array of the face value of the largest value for each
    group size.  Zero indicates there are no examples of that group size in
    the hand, if, for instance, there are no triples.