Some convenient array functions