Assemble a Python program to find a pattern
Find all the numbers in the array [1, 2, 3, 5, 7, 8] which are divisible by 3.
def find_pattern(arr):
    div_by_3 = []

    for num in arr:
        if num % 3 == 0:
            div_by_3.append(num)
    
    return div_by_3