Что-то вроде этого?
# make (small) example
f = np.random.randint(1,4,(2,3))
yxf = np.c_[(*map(np.ravel,(*np.indices(f.shape),f)),)]
yxf
# array([[0, 0, 1],
# [0, 1, 3],
# [0, 2, 3],
# [1, 0, 2],
# [1, 1, 2],
# [1, 2, 2]])
# process
yxf[:,:2].repeat(yxf[:,2],axis=0)
# array([[0, 0],
# [0, 1],
# [0, 1],
# [0, 1],
# [0, 2],
# [0, 2],
# [0, 2],
# [1, 0],
# [1, 0],
# [1, 1],
# [1, 1],
# [1, 2],
# [1, 2]])