How to get an array as output parameter from stored procedure?
Array is not supported in stored procedure, you can use temporary table.

Try this code:

CREATE PROCEDURE `getAttritionData`(IN `supid` BIGINT, IN `from_date` DATE, IN `to_date` DATE, OUT `attr_rate` FLOAT, OUT `TERM_EMP_CNT` INT) 
DETERMINISTIC 
BEGIN 
    DECLARE i INTEGER DEFAULT 0;
    DECLARE CNT_EMP INTEGER DEFAULT 0;
    DECLARE CNT_EMP_SUS INTEGER DEFAULT 0;
    DECLARE TOT_EMP INTEGER DEFAULT 0;
    CREATE TEMPORARY TABLE T1(CDATE DATE,TOTAL_EMP INTEGER, TOTAL_SUSPENDED INTEGER);
    WHILE from_date&lt;=to_date DO
        SELECT COUNT(EMPLOYEE_ID) INTO CNT_EMP 
        FROM employee 
        WHERE sup_id=supid AND doj&lt;from_date AND (term_date&gt;from_date OR term_date='0000-00-00') AND app_role=1;
        SELECT COUNT(EMPLOYEE_ID) INTO CNT_EMP_SUS 
        FROM employee 
        WHERE sup_id=supid AND term_date=from_date AND app_role=1;
        INSERT INTO T1(CDATE,TOTAL_EMP,TOTAL_SUSPENDED) VALUES (from_date,CNT_EMP,CNT_EMP_SUS);
        SET from_date=date_add(from_date, INTERVAL 1 DAY);
    END WHILE;
    Select * from T1;
    SELECT *,count(CDATE),sum(TOTAL_EMP),SUM(TOTAL_SUSPENDED),((SUM(TOTAL_EMP)/count(CDATE))*365/12) AVG_HEAD_COUNT, (SUM(TOTAL_SUSPENDED)/((SUM(TOTAL_EMP)/count(CDATE))*365/12)) atr_rate FROM T1 group by MONTH(CDATE);

END


Hope your issue will be fixed.