<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def process_array_items(self, array, json):
 """Iterate through all `items` and create a resource for each. In addition map the resources under the `items_mapped` by the resource id and type. :param array: Array resource. :param json: Raw JSON dictionary. """

        for item in json['items']:
            key = None
            processed = self.from_json(item)

            if isinstance(processed, Asset):
                key = 'Asset'
            elif isinstance(processed, Entry):
                key = 'Entry'

            if key is not None:
                array.items_mapped[key][processed.sys['id']] = processed

            array.items.append(processed)