def distribute_bin_all(dimension, workers):
    """
    Computes the start indexes and bin sizes of all splits to distribute
    computations across multiple workers.

    Parameters
    ----------
    dimension : int
        the size of the array to be distributed
    workers : int, optional
        the amount of workers

    Returns
    -------
    ([int], [int])
        The list of start indexes and the list of bin sizes to distribute data.
    """

    original_size = workers
    if workers > dimension:
        workers = dimension

    bin_size = dimension // workers
    large_bin_number = dimension - bin_size * workers

    bin_index = 0
    bin_indexes = []
    bin_sizes = []

    for j_index in range(original_size):
        if j_index >= workers:
            bin_indexes.append(0)
            bin_sizes.append(0)
            continue

        l_bin_size = bin_size
        if j_index < large_bin_number:
            l_bin_size += 1

        bin_indexes.append(bin_index)
        bin_sizes.append(l_bin_size)

        bin_index += l_bin_size

    return bin_indexes, bin_sizes