Assign result of regexp_split_to_array() to Pl/pgSQL array variable
array is a reserved word. You cannot use it as variable name in plpgsql.
This works:

DO
$do$
DECLARE
   _arr text[];
BEGIN
SELECT regexp_split_to_array('thiiis splits into array with spaces', '\s+')
INTO _arr;

RAISE NOTICE '%', _arr[1];
END
$do$;


SQL Fiddle

Also simplified  E'\\s+' -> '\s+'.
standard_conforming_strings = ON is the default since Postgres 9.1 and should be the universal setting by now.