Matrix-Vector equation for active and reactive power in a transmission line
I'm not sure if what I'm proposing is "vectorized" enough, but...

Define \$ C^+\$ to be the incidence matrix with only the positive elements, something like C(C>0) in Matlab (I'm assuming your incidence matrix is directed).
Then \$C^+\tilde{v}\$ gives you a vector of \$N_L\$ voltage phasor values, where \$N_L\$ is the number of branches you have and the element \$[C^+\tilde{v}]_\ell\$ is the voltage at the "from" node of branch \$\ell\$.

Then we can write \$P_\ell=\text{real}\left(\left[C^+\tilde{v}\right]_\ell[\text{conj}(i)]_\ell\right)\$,
where "real" takes the real part, "conj" is the complex conjugate, and "\$i\$" is the complex "directed" current phasor vector at all branches, \$i=[C\tilde{v}]_\ell b_\ell\$.