Abstracted arrays of vectors into its own functions.