I have done a search and I have done some experimenting but I can find no answer.
Is there a simple way to update the nth element of an array. In case I am not being clear the following line does not work but it does illustrate what I am trying to do:
arrayname select _n = newvalue