Added array sanitizing

Added an escapeArray() function to escape arrays coming from database queries