How to set the interpolation values at the dofs

Is it possible to set the interpolation coefficients?
The following is a simple one dimensional example making first an interpolation of sin(3x).

  from mpi4py import MPI
  import dolfinx as dox
  import numpy as np
  
  mesh = dox.mesh.create_interval(MPI.COMM_WORLD, 5,[2,4])
  Va = dox.fem.FunctionSpace(mesh, ("P", 1))
  u0=dox.fem.Function(Va)

  # Interpolation coefficients for sin(3x)
  u0.interpolate(lambda x: np.sin(3*x[0]))
  print(u0.x.array)

Is there a way to set directly the u0.x.array. to specific values, like u0.x.array=np.array([0,1,0,0,0,0])

Yes, by modifying the existing entries of the array containing the degree of freedom values:

u0.x.array[0:3] = 1.0

perfect, many thanks