AND and OR with arrays implemented