What are some alternative approaches to shuffling arrays in PHP that maintain the original order of elements?

When shuffling arrays in PHP using the `shuffle()` function, the original order of elements is lost. To maintain the original order while still shuffling the array, one alternative approach is to create a new array that stores the original keys of the elements, shuffle the keys, and then use them to rearrange the elements in the original array.

// Original array
$array = [1, 2, 3, 4, 5];

// Store original keys
$keys = array_keys($array);

// Shuffle keys
shuffle($keys);

// Create shuffled array
$shuffledArray = [];
foreach ($keys as $key) {
    $shuffledArray[$key] = $array[$key];
}

// Output shuffled array
print_r($shuffledArray);