Summing elements from an array

I am trying to do some vector arithmetic on an array but unsure of the general syntax that would achieve this. In a very simple form, consider

data {
vector[K] p;
}

parameters {
  array[K] vector[D] mu;
} 

As part of my model, I would like to construct the sum mu[k] * p[k] which is a D dimensional vector. How do I do this as efficiently as possible?

Your dimensions don’t match. mu[k] has dimension D.
I’d use a matrix for mu instead of an array of vectors.