Python Create Subarray From Array To Hashmap Internal Implementation