A generalization of Heffter arrays