Convert ~[] to Vec

#2271 rebased.