@staticmethod
def _decode_array(payload: str, elements: dict) ->list:
    """
        Maps the elements of an array present in the payload string

        Args:
            payload (str): An influx WM message
            elements (dict): A dictionary of elements to look for

        Returns:
            An array with named fields as dictionary
        """
    payload = payload.replace('[', '').replace(']', '')
    payload = payload.split(',')
    array = list()
    target = dict()
    for entry in payload:
        values = entry.split(':')
        for _type, _convertion in elements.items():
            if _type in values[0]:
                target[_type] = _convertion['base'](''.join(filter(lambda c:
                    c not in "{}'", values[1])))
                break
        if len(target.keys()) == len(elements.keys()):
            array.append(target.copy())
            target = dict()
    return array
