Array delete works perfectly well.
myArray = "1,2,3,4,5,6,7,8,9,10"
myArray.delete(3) would give you
myArray = "1,2,3,5,6,7,8,9,10"
If you, then, did a myArray.delete(6), it would give you
myArray = "1,2,3,5,6,7,9,10"
It doesn't "just pops the value off the back". It removes the value at the specific index like in any other programming language.
The action array.pop is the one that pops a value off the back (or the front) of an array. Which is, basicaly, the inverse of what array.push does, adding a value at the back or front of an array.
The problem with your first code, I'm guessing, since you didn't share a capx, is that you are picking a number and deleting another. You must delete the index you picked, or else you will see repetition...