```python
def find_free_run(words: list[int], bits: int, length: int) -> int:
    if not isinstance(capacity, int) or capacity <= 0:
        raise ValueError("Capacity must be a positive integer")
    if len(words) != (capacity + 31) // 32:
        raise ValueError("Word count disagrees with capacity")
    if not isinstance(length, int) or length <= 0:
        raise ValueError("Length must be a positive integer")

    for i in range(len(words)):
        word = words[i]
        if not isinstance(word, int) or word < 0 or word > 4294967295:
            raise ValueError("Bitmap word must be an integer from 0 to 4294967295")

    for start in range(len(words)):
        end = start + length
        if end > len(words):
            continue
        occupied = any(bit_at(words, i) for i in range(start, end))
        if not occupied:
            return start

    return -1


def occupy_run(words: list[int], start: int, length: int) -> list[int]:
    if not isinstance(start, int) or start < 0:
        raise ValueError("Start index must be a non-negative integer")
    if not isinstance(length, int) or length <= 0:
        raise ValueError("Length must be a positive integer")

    new_words = words[:]
    for i in range(start, start + length):
        if i >= len(new_words):
            new_words.append(0)
        word = new_words[i]
        if not isinstance(word, int) or word < 0 or word > 4294967295:
            raise ValueError("Bitmap word must be an integer from 0 to 4294967295")
        if bit_at(new_words, i):
            raise ValueError("Run touches an occupied block")

    for i in range(start, start + length):
        new_words[i] |= 1 << (i % 32)

    return new_words


def bit_at(words: list[int], index: int) -> int:
    if not isinstance(index, int) or index < 0:
        raise ValueError("Index must be a non-negative integer")

    word_index = index // 32
    if word_index >= len(words):
        raise ValueError("Index out of bounds")

    bit_position = index % 32
    return (words[word_index] >> bit_position) & 1
```