implement split for arrays