Update arrays

Also document how to pass arrays to functions