Sorting Views result rows based on an array of node IDs
I got my answer via the Drupal Slack, but reposting it here for anyone who might come across this later, since that's not publicly searchable. It was more of a PHP issue than anything Drupal-specific.
Within the uasort() callback, the $left and $right arguments are objects of the ResultRow class, with nid available from them, so switching $leftPos and $rightPos to $flipped[$left-&gt;nid] and $flipped[$right-&gt;nid], respectively, gets me access to the results' nids.
/**
 * Custom uasort() callback to sort view results by points totals.
 */
function MODULE_sort_by_points_total($left, $right) {
    $order = ['704', '712', '707', '713', '711', '709', '708', '883', '882', '715', '714', '710', '705'];

    $flipped = array_flip($order);
    $leftPos = $flipped[$left-&gt;nid];
    $rightPos = $flipped[$right-&gt;nid];
    return $leftPos &gt;= $rightPos;
}

Continuing on, I figured out that switching it to an anonymous function was what I needed to pass $songAndPoints to the uasort() function, as follows, instead of separating it:
$sortByPointsTotal = function($left, $right) use ($songAndPoints) {
    $order = array_column($songAndPoints, 'nid');
    
    $flipped = array_flip($order);
    $leftPos = $flipped[$left-&gt;nid];
    $rightPos = $flipped[$right-&gt;nid];
    return $leftPos &gt;= $rightPos;
};

uasort($view-&gt;result, $sortByPointsTotal);