2. Let integers $a_{1}, a_{2}, \cdots, a_{2019}$ satisfy $1=a_{1} \leqslant a_{2} \leqslant \cdots \leqslant a_{2019}=99$. Let $f=\left(a_{1}^{2}+a_{2}^{2}+\cdots+a_{2019}^{2}\right)-\left(a_{1} a_{3}+a_{2} a_{4}+a_{3} a_{5}+\cdots+a_{2017} a_{2019}\right)$, find the minimum value $f_{0}$ of $f$, and determine the number of arrays $\left(a_{1}, a_{2}, \cdots, a_{2019}\right)$ that make $f=f_{0}$.
Given the conditions, we have
\[ 2 f = 2\left(a_{1}^{2} + a_{2}^{2} + \cdots + a_{2019}^{2}\right) - \left(2 a_{1} a_{3} + 2 a_{2} a_{4} + 2 a_{3} a_{5} + \cdots + 2 a_{2017} a_{2019}\right) \]
\[ = a_{1}^{2} + a_{2}^{2} + a_{2018}^{2} + a_{2019}^{2} + \sum_{i=1}^{2017}\left(a_{i} - a_{i+2}\right)^{2}. \]
Since \(a_{1}, a_{2}, a_{i+2} - a_{i} (i=1,2, \cdots, 2016)\) are all non-negative integers, we have
\[ a_{1}^{2} \geqslant a_{1}, \quad a_{2}^{2} \geqslant a_{2}, \quad \text{and} \quad \left(a_{i+2} - a_{i}\right)^{2} \geqslant a_{i+2} - a_{i} (i=1,2, \cdots, 2016), \]
thus
\[ a_{1}^{2} + a_{2}^{2} + \sum_{i=1}^{2016}\left(a_{i} - a_{i+2}\right)^{2} \geqslant a_{1} + a_{2} + \sum_{i=1}^{2016}\left(a_{i+2} - a_{i}\right) = a_{2017} + a_{2018}. \]
Therefore,
\[ 2 f \geqslant a_{2017} + a_{2018} + a_{2018}^{2} + a_{2019}^{2} + \left(a_{2017} - a_{2019}\right)^{2} \]
\[ \geqslant 2 a_{2017} + a_{2017}^{2} + 99^{2} + \left(a_{2017} - 99\right)^{2} = 2 a_{2017}^{2} - 196 a_{2017} + 2 \cdot 99^{2} \]
\[ \Rightarrow f \geqslant a_{2017}^{2} - 98 a_{2017} + 99^{2} = \left(a_{2017} - 49\right)^{2} + 7400 \geqslant 7400. \]

Equality holds when \(a_{1} = a_{2} = 1\), \(a_{2017} = a_{2018} = 49\), and \(a_{i+2} - a_{i} \in \{0,1\} (i=1,2, \cdots, 2016)\). Considering \(a_{1} \leqslant a_{2} \leqslant \cdots \leqslant a_{2018}\), then \(a_{i+1}\) must be equal to at least one of \(a_{i+2}\) or \(a_{i}\), meaning each \(k\) \((1 \leqslant k \leqslant 49)\) appears at least twice in \(a_{1}, a_{2}, \cdots, a_{2018}\). Let the number of times \(k\) \((1 \leqslant k \leqslant 49)\) appears be \(1 + b_{1}, 1 + b_{2}, \cdots, 1 + b_{49}\), then
\[ 49 + b_{1} + b_{2} + \cdots + b_{49} = 2018 \]
\[ \Rightarrow b_{1} + b_{2} + \cdots + b_{49} = 1969. \]
The number of positive integer solutions to this equation is \(C_{1969}^{48}\). Therefore, the number of arrays \((a_{1}, a_{2}, \cdots, a_{2019})\) that satisfy \(f = f_{0}\) is \(C_{1969}^{48}\).