Add length as a parameter for constructing vector from array