Creating functions for Arrays