set type of variant to array when it is constructred from vector. This is necessary since a variant of an array of size one is not the same as a variant of one element