Add clear() for extended arrays and hashmaps: delete content, but keep allocated memory around for next time