  Motivated by the classical Eulerian number, descent and excedance numbers in
the hyperoctahedral groups, an triangular array from staircase tableaux and so
on, we study a triangular array $[\mathcal {T}_{n,k}]_{n,k\ge 0}$ satisfying
the recurrence relation: \begin{equation*} \mathcal
{T}_{n,k}=\lambda(a_0n+a_1k+a_2)\mathcal {T}_{n-1,k}+(b_0n+b_1k+b_2)\mathcal
{T}_{n-1,k-1}+\frac{cd}{\lambda}(n-k+1)\mathcal {T}_{n-1,k-2} \end{equation*}
with $\mathcal {T}_{0,0}=1$ and $\mathcal {T}_{n,k}=0$ unless $0\le k\le n$. We
derive a functional transformation for its row-generating function
$\mathcal{T}_n(x)$ from the row-generating function $A_n(x)$ of another array
$[A_{n,k}]_{n,k}$ satisfying a two-term recurrence relation. Based on this
transformation, we can get properties of $\mathcal {T}_{n,k}$ and
$\mathcal{T}_n(x)$ including nonnegativity, log-concavity, real rootedness,
explicit formula and so on. Then we extend the famous Frobenius formula, the
$\gamma$ positivity decomposition and the David-Barton formula for the
classical Eulerian polynomial to those of a generalized Eulerian polynomial. We
also get an identity for the generalized Eulerian polynomial with the general
derivative polynomial.
  Finally, we apply our results to an array from the Lambert function, a
triangular array from staircase tableaux and the alternating-runs triangle of
type $B$ in a unified approach.
