You can load it as a numpy array and set the array of the meshfunction directly:
mf = CellFunction("double", mesh)
mf.array()[:] = my_array
To reuse it in parallel (or in cases where your assumtion no longer holds), you can save it to file and re-read it later:
f = File("my_meshfunction.xml.gz")
f << mf
And re-read it as
mf = MeshFunction("double", mesh, "my_meshfunction.xml.gz")