Monte Carlo simulation of Ising systems using a data structure