transform given array and expected array to contain only boolean values