As for distance between two atoms, you write Carbon #5 and #10, but I am not sure if you mean atoms #5 and #10 (which happen to be Carbon) or the 5th and 10th Carbon atoms?
Anyway:
# Coordinates of all atoms
coords = configuration.cartesianCoordinates()
# Distance between atom 5 and 10 (note that we start counting from 0!)
numpy.linalg.norm(coords[9]-coords[4])
If you need to search for the indices of atoms, you could try (to find the 5th carbon atom):
all_carbon = numpy.where(numpy.array(configuration.elements())==Carbon)[0]
c5 = all_carbon[4] # again, starting at 0 so [4] is 5th carbon atom!
If you have other needs to identify certain atoms, I would recommend using tags to label them. So let's say you have tagged two atoms, atom5 and atom10 using the Builder (or a script), then you can find the distance between them using
c5 = configuration.indicesFromTags("atom5")[0]
c10 = configuration.indicesFromTags("atom10")[0]
distance = numpy.linalg.norm(coords[c5]-coords[c10])