migrate template variables types to sets. phpelements are not suitable for eg foreach and caching