There are quite a few ways to do this. One approach would be to match the input coordinates with the degree of freedom and the insert values at these indices.
You can obtain the dof coordinates using V.tabulate_dof_coordinates()
.
Then you should match the indices of these coordinates with your input indices, and insert them into a corresponding function.
For the insertion into the function see: Assign nodal values in parallel - #2 by nate and the following posts.