allocate_array is sensitive to vector shapes