What is the suggested way to pass array/vector data back and forth from swift and cpp?

C++ templates cannot be instantiated from Swift code, AIUI. I believe you have to typedef std::vector<...> MyVector; or using MyVector = std::vector<...>; in C++ somewhere, and then use the MyVector alias in Swift.