added materials and infra for table indexing, implemented own array class