I'm not sure if there's a good purely Numpy approach to this, but since it looks like you're willing to loop, you could just use itertools.groupby and keep track of the index and group length:
from itertools import groupby
a = np.array([True, False, True, True, True, False, True, True])
i = 0
res = []
for k, g in groupby(a):
l = len(list(g))
if k:
res.append((i,i+l))
i += l
print(res)
# [(0, 1), (2, 5), (6, 8)]
If you want the closed intervals, obviously you can just subtract 1 from the second tuple value.
You could also write it as a generator which can be a little friendlier on the memory with long lists:
from itertools import groupby
a = np.array([True, False, True, True, True, False, True, True])
def true_indices(a):
i = 0
for k, g in groupby(a):
l = len(list(g))
if k:
yield (i,i+l)
i += l
list(true_indices(a))
# [(0, 1), (2, 5), (6, 8)]
True, orFalsealso?[(0, 1), (2, 5), (6, 8)]which could then be used directly as ranges of slices.