re: Why do I get folder named "idx" in my playlist randomly?
"idx" often stands for "index".
Most likely an app is creating this folder for cache purposes while forgetting to flag the folder as private, thus the Media Indexer Service adds the contents to the media database that the music apps read.
The next time the folder appears, see if your music app will tell you the full path to the folder. (Or find it using your favorite file browser.) The full path may give you a hint on which app is using the folder.