Save scalar components as vector

See: Function.assign in Dolfinx - #2 by dokken