indices_zero = []
indices_nonzero = []
for index in range(len(array)):
    if array[index] == 0:
        indicies_zero.append(index)
else:
    indicies_nonzero.append(index)
Getting indices of both zero and nonzero elements in array