Cache results of linkStringToArray

Closes #350