Transformation while vectorizing code I have been tinkering with:

Read Opaque Types chapter in Swift manual.

Read Swift evolution proposal Add a String Initializer with Access to Uninitialized Storage.