Arrays are either fixed (`uint256[3]`) or dynamic (`uint256[]`). Only dynamic storage arrays support `push` and `pop`; memory arrays have a fixed length once created.
address[] public stakers;
function join() external {
stakers.push(msg.sender);
}
function pair() external pure returns (uint256[] memory) {
uint256[] memory out = new uint256[](2);
out[0] = 1; out[1] = 2;
return out;
}Unbounded loops over a growing array are a gas trap: the function can become impossible to call.