  Generalized perfect binary arrays (GPBAs) were used by Jedwab to construct
perfect binary arrays. A non-trivial GPBA can exist only if its energy is $2$
or a multiple of $4$. This paper introduces generalized optimal binary arrays
(GOBAs) with even energy not divisible by $4$, as analogs of GPBAs. We give a
procedure to construct GOBAs based on a characterization of the arrays in terms
of $2$-cocycles. As a further application, we determine negaperiodic Golay
pairs arising from generalized optimal binary sequences of small length.
