from typing import List


def form_array(msg: str, height: int) -> List[List[str]]:
    """
    Form an array of size height x len(msg) containing the message in msg in a zig-zag pattern.
    :param msg: the message to use to populate the array
    :param height: the height of the array
    :return: the array containing the message
    """
    if not msg:
        return [[]]
    if height < 1:
        raise ValueError("height must be positive.")
    length = len(msg)

    # Create the sparse array to store the characters.
    array = [[' ' for _ in range(length)] for _ in range(height)]

    down = True
    posx, posy = 0, 0
    for ch in msg:
        array[posx][posy] = ch
        posy += 1

        # Check if it's time to switch directions.
        if (posx + 1) % height == 0:
            down = False
        if posx == 0:
            down = True

        if down:
            posx += 1
        else:
            posx -= 1
    return array