Set At

Sets an element of an array by index. Modifies the input array.