To implement shuffle play, it is not necessary to actually shuffle filenames in memory. Just generate a random number modulo the number of files, and then play that file. That way your program can shuffle play any number of files, no worries about running out of memory.
By the way, the Roku box has a "media player" app in it by default, and it cannot shuffle play more than a handful of files. Completely useless.
That's random play, not shuffle play. Random play can repeat songs before all songs are played. Shuffle play will play all songs exactly once before any repeats occur. Random play "puts the card back into the deck" before dealing the next one.
You are correct, and that matters if it is a small number of music files. If it is a large number of files, the difference in user experience is irrelevant. But not needing to remember what was already played keeps the player memory footprint small.
Except "small" is very large because this runs face first into the birthday problem so the average distance between duplicates grows to the square root of the number of files.
Hell even actual shuffling is not necessarily enough to "feel" right for human psyche, famously despite the ipod doing actual shuffling[0] users complained because tracks of the same artist / album could still cluster over shuffling an entire library, so they implemented "smart shuffle" to skew the shuffle and break up clusters. An other option is to weight the random pick by how far back a track was last played, or how little it's been played overall. This has the advantage of favouring less played tracks across listening sessions.
[0] and frankly if the ipod was able to do actual shuffling back in 2005 the memory footprint is just a lazy excuse
BTW, Windows Media Player is the winner, as it "just works". Just point it at the root directory of the music files, turn on shuffle play, and it works, and doesn't crash.
By the way, the Roku box has a "media player" app in it by default, and it cannot shuffle play more than a handful of files. Completely useless.