// Put banner-code placeholders passed from bannerListCallMtkLib snippet into $sortedBanners array
$sortedBanners = array(
   $sortedBanner0,
   $sortedBanner1,
   $sortedBanner2);

// Randomise the entries in the $sortedBanners array
shuffle($sortedBanners);

// Create numbered 'shuffledBanner' placeholders for use in the Mtk page
$shuffledBanners = array(
  'shuffledBanner0' => $sortedBanners[0],
  'shuffledBanner1' => $sortedBanners[1],
  'shuffledBanner2' => $sortedBanners[2]);
$modx->setPlaceholders($shuffledBanners);