Efficient way to turn a linear layer vector into an arrangement of a symmetric matrix?

I have a vector A = [ a1,a2,a3,a4,…,an, b1,b2,…,bn-1,c1,c2,…,cn-2,…,p1]. I want to create a symmetric matrix from this such as a Matrix M such that:

M = 
[a1  b1  c1  d1  ...................  p1
 b1  a2  b2  c2  ...................  o2
 c1  b2  a3  b3  ...................  n3
 .......................................
 ....................................... 
p1  ................................. an]