def check_array(p_section, p_name, p_value, p_check=None, p_delim=','):
    """ check that given value is convertible to array

  A str value is converted to array by splitting each comma separated
  elements

  Additionally, the function checks that each elements meets ``p_check``
  function requirement.

  Example:

  .. code-block:: python

     l_value = "1,2,3,4,5"
     l_value = check_array(l_value, check_float)
     print(l_value)
     # [1.0, 2.0, 3.0, 4.0]

     l_value = "on,on;off,no;true,false"
     l_value = check_array(l_value, is_array(p_check=check_bool), p_delim=";")
     print(l_value)
     # [[True, True], [False, False], [True, False]]

  Args:
    p_section (str): parameter section name
    p_name (str): parameter name
    p_value (str): input value
    p_check (function): sub-checker to call on each elements, default ``None``
    p_delim (str) : used as delimiter to split  given str value

  Raises:
    ConfigValueValueError: value not an email

  Returns:
    list: array-converted value
  """
    l_res = []
    l_value = p_value
    if not isinstance(l_value, list):
        l_value = l_value.split(p_delim)
    for c_val in l_value:
        if p_check:
            l_res.append(p_check(p_section, p_name, c_val))
        else:
            l_res.append(c_val)
    return l_res
