Indexed fields (fields with numerical keys) are stored as a holy array inside the object. Therefore lookup time is O(1)
Same for a lookup array it's O(1)
Iterating through an array of objects and testing their ids against the provided one is a O(n) operation.