from typing import List
from typing import Any


def list_get(array: List[Any], index: int, default: Any = None) -> Any:
    """
    Get an element of an array at a specified index. If the index is out
    of bounds, return a given default value.
    """
    try:
        return array[index]
    except IndexError as e:
        return default