Then, I tried to create a duplicate listbox object and insert lines from it into random indexes ... It didn't work, as if the index number exceeded the existing line number it ignored the action.
Not sure what you're trying to do here, but if the insert line action only takes an index from 1 to number of lines, then random(number_of_lines) + 1 should insert to a random, valid place and will be totally randomly shuffled.