Array utility functions