Change Array Index Value Javascript Snake Game