Max of a vector

For small arrays should be fine? Some related warning here.