The account numbers which appear in the beginning balances grid are stored in the GL7ACCOUNTS table. 

All account numbers grouped by funds will be listed in the Beginning Balances grid. Only when the fund’s beginning balances are locked, will they be excluded from the grid. By default the balances are zero and can be updated manually or through the API. You can clear the balances but the account numbers/class associated with each fund will continue to be listed. The only way to remove the account from the list would be to delete that account.