data structs

* range checking for TemplateArray and TemplateVector
* fixed a sneaky bug in TemplateVector insertInOrder
* operator== for TemplateArray and TemplateVector
* TemplateSet, for having lists with no duplicates