semantic: Replace typeofs in typeids.
semantic: Replace classes in arrays too.