Add indexing to Material