Fix conversion functions for arrays (especially for arrays of string)

Should fix #1