Gets the number in the vector at the specified index. Throws an invalid argument exception if the index is out of range.