When storing a surtain storage array in a scoreboard you are unable to remove it afterwards in the same function.
For example in the following function:
data modify storage minecraft:array moves prepend value 1
execute store result score move info run data get storage minecraft:array moves[0]
data remove storage minecraft:array moves[0]
By executing the function, the data gets stored in the scoreboard but not removed afterwards.
nvm It was a problem in my datapack.