How to assign different values to different elements and How to extract values of a variable defined as a function of the solution u?

I can assign different values to different elements based on Equivalent for Expression in dolfinx
Yet, I don’t know how to extract values of a variable defined as a function of the solution u? Here is a MRE that can be easily copied compared to the one shown in the previous post:

import numpy as np
import ufl
from mpi4py import MPI
import dolfinx
from dolfinx.fem import *

L = 1.0
domain = dolfinx.mesh.create_interval(MPI.COMM_WORLD, 10, (0.0, L))
V = FunctionSpace(domain, ('CG', 1))

u = Function(V)
u0 = Function(V)

x_space = np.linspace(0, 1.0, 11)
init_cond = x_space * 50.0

u0.vector.array[:] = init_cond
print(f'--> u0: {u0.vector.array}')

u.vector.array[:] = u0.vector.array
print("u: ", u.vector.array)

testf = 5.0 * u  #Just a simple example; 'testf' is much more complex in my case.
print(f"--> testf: {testf}")
#print(f'--> testf: {testf.vector.array}')
u0.interpolate(testf)
print(f'--> testf: {u0.vector.array}')