```python
def encode_list(list1):
    """
    Performs run-length encoding on a list.

    Args:
        list1: The input list of elements.

    Returns:
        A list of lists, where each inner list contains an element
        and its consecutive count.
    """
    if not list1:
        return []

    encoded = []
    current_element = list1[0]
    count = 1

    for i in range(1, len(list1)):
        if list1[i] == current_element:
            count += 1
        else:
            encoded.append([current_element, count])
            current_element = list1[i]
            count = 1
    
    # Append the last run
    encoded.append([current_element, count])

    return encoded
```