def find_smallest(arr):
    """Find Smallest value in an array."""
    smallest = arr[0]
    smallest_i = 0
    for i, val in enumerate(arr):
        if val < smallest:
            smallest = val
            smallest_i = i
    return smallest_i