added helper functions on mesh for getting arrays