LRU cache implementation using Array class for indices