if you want array you can do it like this...

=SUM(IF((A1:A8=C1)+(A1:A8=C2)+(A1:A8=C3),B1:B8,0))
or

manually entering "letter" for condition...

=SUM(IF(A1:A8={"B","E","H"},B1:B8,0))
see sample file attached.

adding numbers.xlsx