tf.unravel_index takes a flat index into an array and a shape, and returns the tuple that represents that index in the array.
with tf.Session() as sess:
t = tf.unravel_index(tf.constant(15), [2, 3, 4])
print(sess.run(t)) # [1 0 3]
Is there an inverse? tf.ravel_index doesn't exist, but maybe it's under a different name?