Inserting Values into RHS Vector

As a motivating example, suppose I want to set up the linear algebra problem for the BVP

-\nabla^2 u = \delta(\mathbf{x} - \mathbf{x}_0) \tag{1}

where u: \Omega \subset \mathbb{R}^2 \to \mathbb{R}. Choosing test functions from a finite-dimensional function space V_h = \mathrm{span}\{\phi_i| i = 1,...,n\}, (1) can be phrased as follows: find u_h \in V_h st

\int_{\Omega}\nabla u_h \cdot \nabla\phi_i dx = \int_{\Omega} \delta \phi_i dx \tag{2} \\ = \phi_i(\mathbf{x}_0)

for each \phi_i, \; i = 1,...,n. Now, my question is the following - if b denotes the rhs vector of the corresponding linear algebra problem, how do we assemble it? From Delta Implementation we can query the values of basis functions at specific points. However, the important part now is to put these values into b. In a more mathematical form, if \mathbf{x}_0 \in \mathrm{supp}(\phi_{i_n}) for n = 1,2,3, how do we find the entries of b corresponding to each index i_n and insert \phi_{i_n}(\mathbf{x}_0) into b_{i_n}?

Closing this thread as it as been answered at: